Skip to content

Commit

Permalink
Merge pull request #4959 from BitGo/BTC-1351.use-createPsbtDecode
Browse files Browse the repository at this point in the history
fix(wp): use createPsbtDecode instead of createPsbtFromBuffer
  • Loading branch information
OttoAllmendinger committed Sep 27, 2024
2 parents 4954d06 + 06d0b30 commit ac08e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/sdk-api/src/v1/signPsbt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function signPsbtRequest(params: { psbt: string; keychain: { xprv: string
throw new Error(`invalid params.keychain.xprv`);
}

const psbt = utxolib.bitgo.createPsbtFromBuffer(Buffer.from(params.psbt, 'hex'), utxolib.networks.bitcoin);
const psbt = utxolib.bitgo.createPsbtDecode(params.psbt, utxolib.networks.bitcoin);
const keypair = utxolib.bip32.fromBase58(params.keychain.xprv, utxolib.networks.bitcoin);
debug('signing PSBT with keychain %s', keypair.neutered().toBase58());
utxolib.bitgo.withUnsafeNonSegwit(psbt, () => psbt.signAllInputsHD(keypair));
Expand Down

0 comments on commit ac08e70

Please sign in to comment.