Display missing taproot inner script

fixes #973
This commit is contained in:
softsimon 2021-12-06 00:03:40 +04:00
parent 1e40ec4fd0
commit 10a110e682
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

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')));
}
}
}