diff --git a/packages/siwe-parser/lib/utils.ts b/packages/siwe-parser/lib/utils.ts index 3c043e7b..8385ee2a 100644 --- a/packages/siwe-parser/lib/utils.ts +++ b/packages/siwe-parser/lib/utils.ts @@ -6,6 +6,10 @@ import { bytesToHex } from '@noble/hashes/utils'; * @returns Either the return is or not in the EIP-55 format. */ export const isEIP55Address = (address: string) => { + if(address.length != 42) { + return false; + } + const lowerAddress = `${address}`.toLowerCase().replace('0x', ''); var hash = bytesToHex(keccak_256(lowerAddress)); var ret = '0x';