Browse Source

Make sure case with only one value in scriptSig as P2SH ONLY applies if the script is P2WPKH or P2WSH

hk-custom-address
Thomas Kerin 8 years ago
committed by Daniel Cousens
parent
commit
e4db4a07b0
  1. 4
      src/templates/scripthash/input.js

4
src/templates/scripthash/input.js

@ -21,8 +21,8 @@ function check (script, allowIncomplete) {
var inputType = bscript.classifyInput(scriptSigChunks, allowIncomplete)
var outputType = bscript.classifyOutput(redeemScriptChunks)
if (chunks.length === 1 && (outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH)) {
return true
if (chunks.length === 1) {
return outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH
}
return inputType === outputType

Loading…
Cancel
Save