@@ -13,7 +13,7 @@ import {
1313 WalletSignTransactionOptions ,
1414} from '@bitgo/sdk-core' ;
1515
16- import { AbstractUtxoCoin , getReplayProtectionAddresses , generateAddress } from '../../src' ;
16+ import { AbstractUtxoCoin , getReplayProtectionAddresses , generateAddress , getReplayProtectionPubkeys } from '../../src' ;
1717import { SdkBackend } from '../../src/transaction/types' ;
1818
1919import { hasWasmUtxoSupport } from './transaction/fixedScript/util' ;
@@ -176,7 +176,9 @@ describe(`UTXO coin signTransaction`, async function () {
176176 } ) ) ;
177177 const unspentSum = inputs . reduce ( ( prev : bigint , curr ) => prev + curr . value , BigInt ( 0 ) ) ;
178178 const outputs : testutil . Output [ ] = [ { scriptType : 'p2sh' , value : unspentSum - BigInt ( 1000 ) } ] ;
179- const psbt = testutil . constructPsbt ( inputs , outputs , coin . network , rootWalletKeys , 'unsigned' ) ;
179+ const psbt = testutil . constructPsbt ( inputs , outputs , coin . network , rootWalletKeys , 'unsigned' , {
180+ p2shP2pkKey : getReplayProtectionPubkeys ( coin . network ) [ 0 ] ,
181+ } ) ;
180182
181183 for ( const v of [ false , true ] ) {
182184 await signTransaction ( psbt , v ) ;
@@ -402,7 +404,9 @@ function run<TNumber extends number | bigint = number>(
402404 const outputs : testutil . Output [ ] = [
403405 { address : getOutputAddress ( getWalletKeys ( 'test' ) ) , value : unspentSum - BigInt ( 1000 ) } ,
404406 ] ;
405- const psbt = testutil . constructPsbt ( inputs , outputs , coin . network , walletKeys , 'unsigned' ) ;
407+ const psbt = testutil . constructPsbt ( inputs , outputs , coin . network , walletKeys , 'unsigned' , {
408+ p2shP2pkKey : getReplayProtectionPubkeys ( coin . network ) [ 0 ] ,
409+ } ) ;
406410 utxolib . bitgo . addXpubsToPsbt ( psbt , walletKeys ) ;
407411 return psbt ;
408412 }
0 commit comments