File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed
sdk-core/src/bitgo/wallet Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ describe('BTC:', () => {
118118 } ) ;
119119
120120 it ( 'should detect hex spoofing in BUILD_SIGN_SEND' , async ( ) : Promise < void > => {
121- const { getDefaultWalletKeys, toKeychainObjects } = require ( '../../../bitgo/test/v2/unit/coins/utxo/util/keychains' ) ;
121+ const {
122+ getDefaultWalletKeys,
123+ toKeychainObjects,
124+ } = require ( '../../../bitgo/test/v2/unit/coins/utxo/util/keychains' ) ;
122125 const rootWalletKey = getDefaultWalletKeys ( ) ;
123126 const keysObj = toKeychainObjects ( rootWalletKey , 'pass' ) ;
124127
@@ -164,9 +167,7 @@ describe('BTC:', () => {
164167 return [ 200 , { txid : 'test-txid-123' , status : 'signed' } ] ;
165168 } ) ;
166169
167- keysObj . forEach ( ( k , i ) =>
168- nock ( bgUrl ) . get ( `/api/v2/${ wallet . coin ( ) } /key/${ wallet . keyIds ( ) [ i ] } ` ) . reply ( 200 , k )
169- ) ;
170+ keysObj . forEach ( ( k , i ) => nock ( bgUrl ) . get ( `/api/v2/${ wallet . coin ( ) } /key/${ wallet . keyIds ( ) [ i ] } ` ) . reply ( 200 , k ) ) ;
170171
171172 await assert . rejects (
172173 wallet . consolidateUnspents ( { walletPassphrase : 'pass' } ) ,
Original file line number Diff line number Diff line change @@ -737,15 +737,17 @@ export class Wallet implements IWallet {
737737
738738 // Validate that the platform-built transaction matches user parameters
739739 const txPrebuilds = Array . isArray ( buildResponse ) ? buildResponse : [ buildResponse ] ;
740- for ( const txPrebuild of txPrebuilds ) {
741- await this . baseCoin . verifyTransaction ( {
742- txParams : params ,
743- txPrebuild,
744- wallet : this ,
745- verification : params . verification ?? { } ,
746- reqId,
747- } ) ;
748- }
740+ await Promise . all (
741+ txPrebuilds . map ( ( txPrebuild ) =>
742+ this . baseCoin . verifyTransaction ( {
743+ txParams : params ,
744+ txPrebuild,
745+ wallet : this ,
746+ verification : params . verification ?? { } ,
747+ reqId,
748+ } )
749+ )
750+ ) ;
749751
750752 const keychains = ( await this . baseCoin
751753 . keychains ( )
You can’t perform that action at this time.
0 commit comments