TxBuilder: avoid var redeclaration due to hoisting

This commit is contained in:
Daniel Cousens 2015-01-05 14:50:54 +11:00
parent 46db11e04a
commit ebe34db8df

View file

@ -191,9 +191,8 @@ TransactionBuilder.prototype.__build = function(allowIncomplete) {
switch (scriptType) {
case 'pubkeyhash':
var signature = signatures[0]
var pubKey = input.pubKeys[0]
scriptSig = scripts.pubKeyHashInput(signature, pubKey)
scriptSig = scripts.pubKeyHashInput(signatures[0], pubKey)
break
@ -204,8 +203,7 @@ TransactionBuilder.prototype.__build = function(allowIncomplete) {
break
case 'pubkey':
var signature = signatures[0]
scriptSig = scripts.pubKeyInput(signature)
scriptSig = scripts.pubKeyInput(signatures[0])
break