@@ -55,7 +55,8 @@ def max_market_fee(self):
55
55
from .amount import Amount
56
56
57
57
return Amount (
58
- {"amount" : self ["options" ]["max_market_fee" ], "asset_id" : self ["id" ]}
58
+ {"amount" : self ["options" ]["max_market_fee" ], "asset_id" : self ["id" ]},
59
+ blockchain_instance = self .blockchain ,
59
60
)
60
61
61
62
@property
@@ -222,10 +223,12 @@ def release(
222
223
{
223
224
"flags" : flags_int ,
224
225
"whitelist_authorities" : [
225
- Account (a )["id" ] for a in whitelist_authorities
226
+ Account (a , blockchain_instance = self .blockchain )["id" ]
227
+ for a in whitelist_authorities
226
228
],
227
229
"blacklist_authorities" : [
228
- Account (a )["id" ] for a in blacklist_authorities
230
+ Account (a , blockchain_instance = self .blockchain )["id" ]
231
+ for a in blacklist_authorities
229
232
],
230
233
"whitelist_markets" : [Asset (a )["id" ] for a in whitelist_markets ],
231
234
"blacklist_markets" : [Asset (a )["id" ] for a in blacklist_markets ],
@@ -330,11 +333,17 @@ def add_authorities(self, type, authorities=[]):
330
333
options = self ["options" ]
331
334
if type == "whitelist" :
332
335
options ["whitelist_authorities" ].extend (
333
- [Account (a )["id" ] for a in authorities ]
336
+ [
337
+ Account (a , blockchain_instance = self .blockchain )["id" ]
338
+ for a in authorities
339
+ ]
334
340
)
335
341
if type == "blacklist" :
336
342
options ["blacklist_authorities" ].extend (
337
- [Account (a )["id" ] for a in authorities ]
343
+ [
344
+ Account (a , blockchain_instance = self .blockchain )["id" ]
345
+ for a in authorities
346
+ ]
338
347
)
339
348
op = operations .Asset_update (
340
349
** {
@@ -360,10 +369,14 @@ def remove_authorities(self, type, authorities=[]):
360
369
options = self ["options" ]
361
370
if type == "whitelist" :
362
371
for a in authorities :
363
- options ["whitelist_authorities" ].remove (Account (a )["id" ])
372
+ options ["whitelist_authorities" ].remove (
373
+ Account (a , blockchain_instance = self .blockchain )["id" ]
374
+ )
364
375
if type == "blacklist" :
365
376
for a in authorities :
366
- options ["blacklist_authorities" ].remove (Account (a )["id" ])
377
+ options ["blacklist_authorities" ].remove (
378
+ Account (a , blockchain_instance = self .blockchain )["id" ]
379
+ )
367
380
op = operations .Asset_update (
368
381
** {
369
382
"fee" : {"amount" : 0 , "asset_id" : "1.3.0" },
@@ -396,9 +409,19 @@ def add_markets(self, type, authorities=[], force_enable=True):
396
409
), "whitelist feature not enabled"
397
410
398
411
if type == "whitelist" :
399
- options ["whitelist_markets" ].extend ([Asset (a )["id" ] for a in authorities ])
412
+ options ["whitelist_markets" ].extend (
413
+ [
414
+ Asset (a , blockchain_instance = self .blockchain )["id" ]
415
+ for a in authorities
416
+ ]
417
+ )
400
418
if type == "blacklist" :
401
- options ["blacklist_markets" ].extend ([Asset (a )["id" ] for a in authorities ])
419
+ options ["blacklist_markets" ].extend (
420
+ [
421
+ Asset (a , blockchain_instance = self .blockchain )["id" ]
422
+ for a in authorities
423
+ ]
424
+ )
402
425
op = operations .Asset_update (
403
426
** {
404
427
"fee" : {"amount" : 0 , "asset_id" : "1.3.0" },
@@ -422,10 +445,14 @@ def remove_markets(self, type, authorities=[]):
422
445
options = self ["options" ]
423
446
if type == "whitelist" :
424
447
for a in authorities :
425
- options ["whitelist_markets" ].remove (Asset (a )["id" ])
448
+ options ["whitelist_markets" ].remove (
449
+ Asset (a , blockchain_instance = self .blockchain )["id" ]
450
+ )
426
451
if type == "blacklist" :
427
452
for a in authorities :
428
- options ["blacklist_markets" ].remove (Asset (a )["id" ])
453
+ options ["blacklist_markets" ].remove (
454
+ Asset (a , blockchain_instance = self .blockchain )["id" ]
455
+ )
429
456
op = operations .Asset_update (
430
457
** {
431
458
"fee" : {"amount" : 0 , "asset_id" : "1.3.0" },
@@ -481,7 +508,10 @@ def update_feed_producers(self, producers):
481
508
"fee" : {"amount" : 0 , "asset_id" : "1.3.0" },
482
509
"issuer" : self ["issuer" ],
483
510
"asset_to_update" : self ["id" ],
484
- "new_feed_producers" : [Account (a )["id" ] for a in producers ],
511
+ "new_feed_producers" : [
512
+ Account (a , blockchain_instance = self .blockchain )["id" ]
513
+ for a in producers
514
+ ],
485
515
"extensions" : [],
486
516
}
487
517
)
@@ -495,7 +525,7 @@ def change_issuer(self, new_issuer, **kwargs):
495
525
"""
496
526
from .account import Account
497
527
498
- new_issuer = Account (new_issuer )
528
+ new_issuer = Account (new_issuer , blockchain_instance = self . blockchain )
499
529
op = operations .Asset_update_issuer (
500
530
** {
501
531
"fee" : {"amount" : 0 , "asset_id" : "1.3.0" },
@@ -517,9 +547,11 @@ def issue(self, amount, to, memo=None, **kwargs):
517
547
from .memo import Memo
518
548
from .account import Account
519
549
520
- to = Account (to )
550
+ to = Account (to , blockchain_instance = self . blockchain )
521
551
account = Account (self ["issuer" ])
522
- memoObj = Memo (from_account = account , to_account = to , blockchain_instance = self )
552
+ memoObj = Memo (
553
+ from_account = account , to_account = to , blockchain_instance = self .blockchain
554
+ )
523
555
524
556
# append operation
525
557
op = operations .Asset_issue (
@@ -538,4 +570,4 @@ def issue(self, amount, to, memo=None, **kwargs):
538
570
"extensions" : [],
539
571
}
540
572
)
541
- return self .exbet .finalizeOp (op , self ["issuer" ], "active" , ** kwargs )
573
+ return self .blockchain .finalizeOp (op , self ["issuer" ], "active" , ** kwargs )
0 commit comments