Skip to content

Commit 328aa6c

Browse files
committed
update docs
1 parent 421d5ad commit 328aa6c

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

btc-docs/tutorials/auction.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,7 @@ export async function call(
236236
// build change output
237237
psbt.change(address, feeRate).seal();
238238

239-
const options = psbt.psbtOptions() || {
240-
autoFinalized: false,
241-
toSignInputs: [],
242-
};
243-
244-
utxos.forEach((_, index) => {
245-
options.toSignInputs.push({
246-
index: index + 1,
247-
address: address,
248-
});
249-
});
250-
251-
const signedPsbtHex = await signer.signPsbt(psbt.toHex(), options);
239+
const signedPsbtHex = await signer.signPsbt(psbt.toHex(), psbt.psbtOptions());
252240
const signedPsbt = psbt.combine(ExtPsbt.fromHex(signedPsbtHex)).finalizeAllInputs();
253241
const callTx = signedPsbt.extractTransaction();
254242
markSpent(provider, callTx);
@@ -303,8 +291,8 @@ export class Auction extends SmartContract<AuctionState> {
303291

304292
// auction continues with a higher bidder
305293
this.appendStateOutput(
306-
TxUtils.buildOutput(this.ctx.spentScript, TxUtils.toSatoshis(bid)),
307-
Auction.stateHash(this.state),
294+
TxUtils.buildOutput(this.ctx.spentScript, TxUtils.toSatoshis(bid)),
295+
Auction.stateHash(this.state),
308296
);
309297

310298
const refundScript: ByteString = TxUtils.buildP2PKHScript(hash160(highestBidder));

0 commit comments

Comments
 (0)