@@ -26,17 +26,14 @@ const beforeAllFunction = async (transaction: TransactionType) => {
2626 add : true ,
2727 appjson : userdataPath ,
2828 } ) ;
29-
30- const { address } = await CLI . getAddress ( {
31- currency : transaction . accountToCredit . currency . speculosApp . name ,
32- path : transaction . accountToCredit . accountPath ,
33- derivationMode : transaction . accountToCredit . derivationMode ,
34- } ) ;
35-
36- transaction . accountToCredit . address = address ;
37- transaction . recipientAddress = address ;
38-
39- return address ;
29+ transaction . accountToDebit . address = await CLI . getAddressForAccount (
30+ transaction . accountToDebit ,
31+ ) ;
32+
33+ transaction . accountToCredit . address = await CLI . getAddressForAccount (
34+ transaction . accountToCredit ,
35+ ) ;
36+ transaction . recipientAddress = transaction . accountToCredit . address ;
4037 } ,
4138 ] ,
4239 } ) ;
@@ -66,14 +63,9 @@ const beforeAllInvalidAddressFunction = async (
6663 transaction . accountToCredit . accountName !== Account . EMPTY . accountName &&
6764 transaction . accountToCredit . accountName !== Account . BTC_NATIVE_SEGWIT_1 . accountName
6865 ) {
69- const { address } = await CLI . getAddress ( {
70- currency : transaction . accountToCredit . currency . id ,
71- path : transaction . accountToCredit . accountPath ,
72- derivationMode : transaction . accountToCredit . derivationMode ,
73- } ) ;
74-
75- transaction . accountToCredit . address = address ;
76- return address ;
66+ transaction . accountToCredit . address = await CLI . getAddressForAccount (
67+ transaction . accountToCredit ,
68+ ) ;
7769 }
7870
7971 if ( overrideRecipient !== undefined ) {
0 commit comments