@@ -352,14 +352,14 @@ impl TestSession {
352
352
}
353
353
354
354
/// send all of the balance of the tx from the gdk session to the specified address
355
- pub fn send_all ( & mut self , address : & str , asset_tag : Option < String > ) {
356
- self . send_all_from_account ( 0 , address, asset_tag ) ;
355
+ pub fn send_all ( & mut self , address : & str , asset_id : Option < String > ) {
356
+ self . send_all_from_account ( 0 , address, asset_id ) ;
357
357
}
358
358
pub fn send_all_from_account (
359
359
& mut self ,
360
360
subaccount : u32 ,
361
361
address : & str ,
362
- asset_tag : Option < String > ,
362
+ asset_id : Option < String > ,
363
363
) -> String {
364
364
//let init_sat = self.balance_gdk();
365
365
//let init_sat_addr = self.balance_addr(address);
@@ -370,7 +370,7 @@ impl TestSession {
370
370
create_opt. addressees . push ( AddressAmount {
371
371
address : address. to_string ( ) ,
372
372
satoshi : 0 ,
373
- asset_tag : asset_tag . clone ( ) ,
373
+ asset_id : asset_id . clone ( ) ,
374
374
} ) ;
375
375
create_opt. send_all = Some ( true ) ;
376
376
let tx = self . session . create_transaction ( & mut create_opt) . unwrap ( ) ;
@@ -381,7 +381,7 @@ impl TestSession {
381
381
self . wait_account_tx ( subaccount, & txid) ;
382
382
//let end_sat_addr = self.balance_addr(address);
383
383
//assert_eq!(init_sat_addr + init_sat - tx.fee, end_sat_addr);
384
- assert_eq ! ( self . balance_account( subaccount, asset_tag , None ) , 0 ) ;
384
+ assert_eq ! ( self . balance_account( subaccount, asset_id , None ) , 0 ) ;
385
385
386
386
assert ! ( tx. create_transaction. unwrap( ) . send_all. unwrap( ) ) ;
387
387
assert ! ( signed_tx. create_transaction. unwrap( ) . send_all. unwrap( ) ) ;
@@ -409,7 +409,7 @@ impl TestSession {
409
409
create_opt. addressees . push ( AddressAmount {
410
410
address : address. to_string ( ) ,
411
411
satoshi,
412
- asset_tag : asset. clone ( ) . or ( self . asset_tag ( ) ) ,
412
+ asset_id : asset. clone ( ) . or ( self . asset_id ( ) ) ,
413
413
} ) ;
414
414
create_opt. memo = memo;
415
415
create_opt. utxos = unspent_outputs;
@@ -478,7 +478,7 @@ impl TestSession {
478
478
create_opt. addressees . push ( AddressAmount {
479
479
address : address. to_string ( ) ,
480
480
satoshi,
481
- asset_tag : asset. clone ( ) . or ( self . asset_tag ( ) ) ,
481
+ asset_id : asset. clone ( ) . or ( self . asset_id ( ) ) ,
482
482
} ) ;
483
483
let tx = self . session . create_transaction ( & mut create_opt) . unwrap ( ) ;
484
484
let signed_tx = self . session . sign_transaction ( & tx) . unwrap ( ) ;
@@ -551,7 +551,7 @@ impl TestSession {
551
551
}
552
552
553
553
/// send a tx with multiple recipients with same amount from the gdk session to generated
554
- /// node's addressees, if `assets` contains values, they are used as asset_tag cyclically
554
+ /// node's addressees, if `assets` contains values, they are used as asset_id cyclically
555
555
pub fn send_multi ( & mut self , recipients : u8 , amount : u64 , assets : & Vec < String > ) {
556
556
let init_sat = self . balance_gdk ( None ) ;
557
557
let init_assets_sat = self . balance_gdk_all ( ) ;
@@ -563,8 +563,8 @@ impl TestSession {
563
563
let mut tags = vec ! [ ] ;
564
564
for _ in 0 ..recipients {
565
565
let address = self . node_getnewaddress ( None ) ;
566
- let asset_tag = if assets. is_empty ( ) {
567
- self . asset_tag ( )
566
+ let asset_id = if assets. is_empty ( ) {
567
+ self . asset_id ( )
568
568
} else {
569
569
let current = assets_cycle. next ( ) . unwrap ( ) . to_string ( ) ;
570
570
tags. push ( current. clone ( ) ) ;
@@ -574,7 +574,7 @@ impl TestSession {
574
574
create_opt. addressees . push ( AddressAmount {
575
575
address : address. to_string ( ) ,
576
576
satoshi : amount,
577
- asset_tag ,
577
+ asset_id ,
578
578
} ) ;
579
579
addressees. push ( address) ;
580
580
}
@@ -656,7 +656,7 @@ impl TestSession {
656
656
create_opt. addressees . push ( AddressAmount {
657
657
address : node_address. to_string ( ) ,
658
658
satoshi : init_sat, // not enough to pay the fee with confidential utxos only
659
- asset_tag : self . asset_tag ( ) ,
659
+ asset_id : self . asset_id ( ) ,
660
660
} ) ;
661
661
create_opt. confidential_utxos_only = Some ( true ) ;
662
662
assert ! ( matches!(
@@ -708,7 +708,7 @@ impl TestSession {
708
708
create_opt. addressees . push ( AddressAmount {
709
709
address : address. to_string ( ) ,
710
710
satoshi,
711
- asset_tag : self . asset_tag ( ) ,
711
+ asset_id : self . asset_id ( ) ,
712
712
} ) ;
713
713
let tx = self . session . create_transaction ( & mut create_opt) . unwrap ( ) ;
714
714
let signed_tx = self . session . sign_transaction ( & tx) . unwrap ( ) ;
@@ -731,7 +731,7 @@ impl TestSession {
731
731
create_opt. addressees . push ( AddressAmount {
732
732
address : address. to_string ( ) ,
733
733
satoshi : 0 ,
734
- asset_tag : self . asset_tag ( ) ,
734
+ asset_id : self . asset_id ( ) ,
735
735
} ) ;
736
736
assert ! ( matches!(
737
737
self . session. create_transaction( & mut create_opt) ,
@@ -975,7 +975,7 @@ impl TestSession {
975
975
Amount :: from_btc ( balance_btc) . unwrap ( ) . as_sat ( )
976
976
}
977
977
978
- pub fn asset_tag ( & self ) -> Option < String > {
978
+ pub fn asset_id ( & self ) -> Option < String > {
979
979
match self . network_id {
980
980
NetworkId :: Bitcoin ( _) => None ,
981
981
NetworkId :: Elements ( _) => self . network . policy_asset . clone ( ) ,
0 commit comments