From e4db4a07b0e234592115a32d9397707ade63c4bd Mon Sep 17 00:00:00 2001 From: Thomas Kerin Date: Tue, 3 Jan 2017 20:15:28 +0100 Subject: [PATCH] Make sure case with only one value in scriptSig as P2SH ONLY applies if the script is P2WPKH or P2WSH --- src/templates/scripthash/input.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/scripthash/input.js b/src/templates/scripthash/input.js index 04e3874..81fe8b3 100644 --- a/src/templates/scripthash/input.js +++ b/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