Browse Source

witnessScriptHash: fix null decompile leading to errors -- TODO: add test

addLowRGrinding
Daniel Cousens 7 years ago
parent
commit
47e5a0e179
  1. 2
      src/templates/witnessscripthash/input.js

2
src/templates/witnessscripthash/input.js

@ -18,7 +18,7 @@ function check (chunks, allowIncomplete) {
const witnessScriptChunks = bscript.decompile(witnessScript)
// is witnessScript a valid script?
if (witnessScriptChunks.length === 0) return false
if (!witnessScriptChunks || witnessScriptChunks.length === 0) return false
const witnessRawScriptSig = bscript.compile(chunks.slice(0, -1))

Loading…
Cancel
Save