We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67b4747 commit 57a3700Copy full SHA for 57a3700
src/transaction_builder.js
@@ -238,10 +238,15 @@ TransactionBuilder.prototype.__build = function (allowIncomplete) {
238
})
239
240
// fill in blanks with OP_0
241
- for (var i = 0; i < msSignatures.length; ++i) {
242
- if (msSignatures[i]) continue
243
-
244
- msSignatures[i] = ops.OP_0
+ if (allowIncomplete) {
+ for (var i = 0; i < msSignatures.length; ++i) {
+ if (msSignatures[i]) continue
+
245
+ msSignatures[i] = ops.OP_0
246
+ }
247
+ } else {
248
+ // Array.prototype.filter returns non-sparse array
249
+ msSignatures = msSignatures.filter(function (x) { return x })
250
}
251
252
var redeemScript = allowIncomplete ? undefined : input.redeemScript
0 commit comments