We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cfb674 commit ab640a0Copy full SHA for ab640a0
blockchain_parser/script.py
@@ -109,10 +109,11 @@ def is_p2wpkh(self):
109
return self.script.is_witness_v0_keyhash()
110
111
def is_p2tr(self):
112
- taproot = from_taproot(b2a_hex(self.operations[1]).decode("ascii"))
113
- return self.operations[0] == 1 \
114
- and isinstance(taproot, str) \
115
- and taproot.startswith("bc1p")
+ if type(self.operations[1]) == bytes:
+ taproot = from_taproot(b2a_hex(self.operations[1]).decode("ascii"))
+ return self.operations[0] == 1 \
+ and isinstance(taproot, str) \
116
+ and taproot.startswith("bc1p")
117
118
def is_pubkey(self):
119
return len(self.operations) == 2 \
0 commit comments