diff --git a/modules/utxo-lib/src/testutil/psbt.ts b/modules/utxo-lib/src/testutil/psbt.ts index 23fe79033f..07e5d128aa 100644 --- a/modules/utxo-lib/src/testutil/psbt.ts +++ b/modules/utxo-lib/src/testutil/psbt.ts @@ -201,7 +201,7 @@ export function constructPsbt( if (isWalletUnspent(u) && cosignerName) { addWalletUnspentToPsbt(psbt, u, rootWalletKeys, signerName, cosignerName, { skipNonWitnessUtxo }); } else { - const { redeemScript } = createOutputScriptP2shP2pk(rootWalletKeys[signerName].publicKey); + const { redeemScript } = createOutputScriptP2shP2pk(rootWalletKeys.user.publicKey); assert(redeemScript); addReplayProtectionUnspentToPsbt(psbt, u, redeemScript, { skipNonWitnessUtxo }); } @@ -328,6 +328,12 @@ export class AcidTest { return `${networkName} ${this.signStage} ${this.txFormat}`; } + getReplayProtectionOutputScript(): Buffer { + const { scriptPubKey } = createOutputScriptP2shP2pk(this.rootWalletKeys.user.publicKey); + assert(scriptPubKey); + return scriptPubKey; + } + createPsbt(): UtxoPsbt { const psbt = constructPsbt(this.inputs, this.outputs, this.network, this.rootWalletKeys, this.signStage, { deterministic: true,