diff --git a/packages/sdk/src/transactions/PSBTBuilder.ts b/packages/sdk/src/transactions/PSBTBuilder.ts index 066bf0d1..7a37a78e 100644 --- a/packages/sdk/src/transactions/PSBTBuilder.ts +++ b/packages/sdk/src/transactions/PSBTBuilder.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-extra-semi */ -import { networks, Psbt } from "bitcoinjs-lib" +import { networks, Psbt, Transaction } from "bitcoinjs-lib" import reverseBuffer from "buffer-reverse" import { @@ -133,12 +133,17 @@ export class PSBTBuilder extends FeeEstimator { } get inputsToSign() { + const instantTradeSellerFlow = this.instantTradeMode && !this.autoAdjustment return this.psbt.txInputs.reduce( (acc, _, index) => { if (!this.instantTradeMode || (this.instantTradeMode && index !== INSTANT_BUY_SELLER_INPUT_INDEX)) { acc.signingIndexes = acc.signingIndexes.concat(index) } + if (instantTradeSellerFlow) { + acc.sigHash = Transaction.SIGHASH_SINGLE | Transaction.SIGHASH_ANYONECANPAY + } + return acc }, {