commit
a266ec94e2
|
@ -158,8 +158,7 @@ TxProposal.prototype._addSignaturesToBitcoreTx = function(t, signatures, xpub) {
|
|||
if (signatures.length != this.inputs.length)
|
||||
throw new Error('Number of signatures does not match number of inputs');
|
||||
|
||||
var oks = 0,
|
||||
i = 0,
|
||||
var i = 0,
|
||||
x = new Bitcore.HDPublicKey(xpub);
|
||||
|
||||
_.each(signatures, function(signatureHex) {
|
||||
|
@ -173,14 +172,12 @@ TxProposal.prototype._addSignaturesToBitcoreTx = function(t, signatures, xpub) {
|
|||
sigtype: Bitcore.crypto.Signature.SIGHASH_ALL,
|
||||
publicKey: pub,
|
||||
};
|
||||
t.inputs[i].addSignature(t,s);
|
||||
i++;
|
||||
|
||||
t.applySignature(s);
|
||||
oks++;
|
||||
} catch (e) {};
|
||||
});
|
||||
|
||||
if (oks != t.inputs.length)
|
||||
if (i != t.inputs.length)
|
||||
throw new Error('Wrong signatures');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue