| /** |
| * Check if a string is a valid hex checksum address. |
| * |
| * @param value - The value to check. |
| * @returns Whether the value is a valid hex checksum address. |
| */ |
| exportfunctionisHexChecksumAddress(value: unknown): value is Hex{ |
| returnisString(value)&&HEX_CHECKSUM_ADDRESS_REGEX.test(value); |
| } |
This function does NOT return if the given string is a "valid hex checksum address" (or a "Hex Checksum Address"). It returns true if the characters used in the given string are all allowed in an checksummed address.
The function (and likely some other similarly confusing functions/docs in this same file) should be updated to reflect their purpose.
utils/src/hex.ts
Lines 63 to 71 in 1bea7f3
This function does NOT return if the given string is a "valid hex checksum address" (or a "Hex Checksum Address"). It returns true if the characters used in the given string are all allowed in an checksummed address.
The function (and likely some other similarly confusing functions/docs in this same file) should be updated to reflect their purpose.