[utils] `isHexChecksumAddress` is poorly named and documented
- Dominant language
- TypeScript
- Stars
- 413
- Forks
- 308
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 253
Description
https://github.com/MetaMask/utils/blob/1bea7f378c37117260912af1921556bc57110d20/src/hex.ts#L63-L71
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/hex.ts lines 63-71 and inspect the similarly confusing functions and documentation in that file. Update the naming and documentation to describe the character validation behavior rather than checksum-address validity, with all affected descriptions accurately reflecting their purpose.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100