File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
modules/sdk-core/src/bitgo/wallet Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -735,6 +735,18 @@ export class Wallet implements IWallet {
735735 return buildResponse ;
736736 }
737737
738+ // Validate that the platform-built transaction matches user parameters
739+ 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+ }
749+
738750 const keychains = ( await this . baseCoin
739751 . keychains ( )
740752 . getKeysForSigning ( { wallet : this , reqId } ) ) as unknown as Keychain [ ] ;
@@ -751,8 +763,6 @@ export class Wallet implements IWallet {
751763 allowNonSegwitSigningWithoutPrevTx : ! ! params . bulk ,
752764 } ;
753765
754- const txPrebuilds = Array . isArray ( buildResponse ) ? buildResponse : [ buildResponse ] ;
755-
756766 const selectParams = _ . pick ( params , [ 'comment' , 'otp' , 'bulk' ] ) ;
757767
758768 const response = await Promise . all (
You can’t perform that action at this time.
0 commit comments