Skip to content

Commit 404b6d2

Browse files
author
shadowy-pycoder
committed
fixed non-ascii characters bug
1 parent 473c836 commit 404b6d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitcoin_message_tool/bmt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,8 @@ def verify_message(address: str, message: str, signature: str, /, *, electrum=Fa
679679
""" Verify signature with address and message """
680680
try:
681681
dsig = base64.b64decode(signature)
682-
except base64.binascii.Error as error: # type: ignore
683-
raise SignatureError(f'Failed to decode signature: {error.args[0]}')
682+
except Exception as error:
683+
raise SignatureError(f'Failed to decode signature. {error.args[0].capitalize()}')
684684
if len(dsig) != 65:
685685
raise SignatureError('Signature must be 65 bytes long:', len(dsig))
686686
header, r, s = dsig[0], int.from_bytes(dsig[1:33], 'big'), int.from_bytes(dsig[33:], 'big')

0 commit comments

Comments
 (0)