Skip to content

Commit

Permalink
Make sure we don't add more signatures than needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
caedesvvv committed Oct 23, 2014
1 parent be19fa5 commit 03e7ce5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/dwutil/multisig.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ MultisigFund.prototype.finishTransaction = function(spend, incomplete) {
if (!builder.signatures[input.index]) {
builder.signatures[input.index] = {hashType: Bitcoin.Transaction.SIGHASH_ALL, pubKeys: [], redeemScript: script, scriptType: "multisig", signatures: []};
}
builder.signatures[input.index].signatures = sigs;
// add making sure we don't add more signatures than needed
builder.signatures[input.index].signatures = sigs.slice(0, multisig.m);
} else {
finished = false;
}
Expand Down

0 comments on commit 03e7ce5

Please sign in to comment.