fix txb.sign having issues when an incomplete TX contains OP_0s, but not enough

This commit is contained in:
Ruben de Vries 2015-05-28 22:36:41 +02:00
parent f64df79555
commit d2bee4d67f
2 changed files with 15 additions and 1 deletions

View file

@ -384,7 +384,7 @@ TransactionBuilder.prototype.sign = function (index, keyPair, redeemScript, hash
// check for any matching signatures
unmatched.some(function (signature, i) {
if (!keyPair2.verify(signatureHash, signature)) return false
if (!signature || !keyPair2.verify(signatureHash, signature)) return false
match = signature
// remove matched signature from unmatched