Skip to content

Commit de06357

Browse files
committed
fix: make FinalScriptsFunc backwards compatible by moving isTapscript param to the end
1 parent b8c0ba5 commit de06357

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/psbt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ class Psbt {
294294
input,
295295
script,
296296
isSegwit,
297-
isTapscript,
298297
isP2SH,
299298
isP2WSH,
299+
isTapscript,
300300
this.__CACHE.__EC_LIB,
301301
);
302302
if (finalScriptSig) this.data.updateInput(inputIndex, { finalScriptSig });
@@ -932,9 +932,9 @@ function getFinalScripts(
932932
input,
933933
script,
934934
isSegwit,
935-
isTapscript,
936935
isP2SH,
937936
isP2WSH,
937+
isTapscript = false,
938938
eccLib,
939939
) {
940940
const scriptType = classifyScript(script, eccLib);

test/integration/csv.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ function csvGetFinalScripts(
439439
input: PsbtInput,
440440
script: Buffer,
441441
isSegwit: boolean,
442-
_isTapscript: boolean,
443442
isP2SH: boolean,
444443
isP2WSH: boolean,
445444
): {

test/psbt.utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const buildTapscriptFinalizer = (
1717
input: PsbtInput,
1818
script: Buffer,
1919
_isSegwit: boolean,
20-
_isTapscript: boolean,
2120
_isP2SH: boolean,
2221
_isP2WSH: boolean,
22+
_isTapscript: boolean,
2323
eccLib?: TinySecp256k1Interface,
2424
): {
2525
finalScriptSig: Buffer | undefined;

ts_src/psbt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ export class Psbt {
372372
input,
373373
script,
374374
isSegwit,
375-
isTapscript,
376375
isP2SH,
377376
isP2WSH,
377+
isTapscript,
378378
this.__CACHE.__EC_LIB,
379379
);
380380

@@ -1236,9 +1236,9 @@ function getFinalScripts(
12361236
input: PsbtInput,
12371237
script: Buffer,
12381238
isSegwit: boolean,
1239-
isTapscript: boolean,
12401239
isP2SH: boolean,
12411240
isP2WSH: boolean,
1241+
isTapscript: boolean = false,
12421242
eccLib?: TinySecp256k1Interface,
12431243
): {
12441244
finalScriptSig: Buffer | undefined;

0 commit comments

Comments
 (0)