We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f2e253 commit 04d9b8bCopy full SHA for 04d9b8b
1 file changed
validators/crypto_addresses/eth_address.py
@@ -15,6 +15,9 @@ def _validate_eth_checksum_address(addr: str):
15
addr = addr.replace("0x", "")
16
addr_hash = keccak_256(addr.lower().encode("ascii")).hexdigest()
17
18
+ if len(addr) != 40:
19
+ return False
20
+
21
for i in range(0, 40):
22
if ((int(addr_hash[i], 16) > 7 and addr[i].upper() != addr[i]) or
23
(int(addr_hash[i], 16) <= 7 and addr[i].lower() != addr[i])):
0 commit comments