TxBuilder: avoid var redeclaration due to hoisting
This commit is contained in:
parent
46db11e04a
commit
ebe34db8df
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue