test: throw ValueError for invalid base58 checksum

This commit is contained in:
Sebastian Falbesoner committed 2022-04-05 20:07:33 +02:00
1 parent 219d2c7ee1
commit 65c49ac750
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ def is_valid(v):
try:
payload, version = base58_to_byte(v)
result = bytes([version]) + payload
except AssertionError: # thrown if checksum doesn't match
except ValueError: # thrown if checksum doesn't match
return is_valid_bech32(v)
for template in templates:
prefix = bytearray(template[0])