Merge pull request #974 from mempool/simon/taproot-display-missing-script

Display missing taproot inner script
This commit is contained in:
wiz 2021-12-07 07:26:29 +00:00 committed by GitHub
commit 8412e28073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,6 +299,11 @@ class BitcoinApi implements AbstractBitcoinApi {
const witnessScript = vin.witness[vin.witness.length - 1];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
}
if (vin.prevout.scriptpubkey_type === 'v1_p2tr' && vin.witness && vin.witness.length > 1) {
const witnessScript = vin.witness[vin.witness.length - 2];
vin.inner_witnessscript_asm = this.convertScriptSigAsm(bitcoinjs.script.toASM(Buffer.from(witnessScript, 'hex')));
}
}
}