update local signer integration to support newer version of eth_account.

pull/3475/head
KPrasch 2024-02-08 16:25:38 +01:00 committed by derekpierre
parent 671b81fc4f
commit 4ae72f94ab
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -161,7 +161,12 @@ class KeystoreSigner(Signer):
raise self.InvalidKeyfile(error)
else:
if not is_address(address):
raise self.InvalidKeyfile(f"'{path}' does not contain a valid ethereum address")
try:
address = to_checksum_address(address)
except ValueError:
raise self.InvalidKeyfile(
f"'{path}' does not contain a valid ethereum address"
)
address = to_checksum_address(address)
return address, key_metadata