Browse Source

Merge pull request #908 from bitcoinjs/txbfix

TxBuilder: fix canSign returning true for missing witness value
hk-custom-address
Daniel Cousens 7 years ago
committed by GitHub
parent
commit
b6a6b0a50a
  1. 5
      src/transaction_builder.js

5
src/transaction_builder.js

@ -663,7 +663,10 @@ function canSign (input) {
input.signatures !== undefined &&
input.signatures.length === input.pubKeys.length &&
input.pubKeys.length > 0 &&
input.witness !== undefined
(
input.witness === false ||
(input.witness === true && input.value !== undefined)
)
}
TransactionBuilder.prototype.sign = function (vin, keyPair, redeemScript, hashType, witnessValue, witnessScript) {

Loading…
Cancel
Save