lambdaclass / lambdaclass/eth-agent
Address case sensitivity handled inconsistently
Open
Nobody has claimed this yet.
bug
high-priority
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Address comparison and normalization is inconsistent across the codebase. Some places use toLowerCase(), others don't, leading to potential mismatches.
Locations
src/protocol/account.ts:231, 236, 268- uses toLowerCase()- Other comparison points may not normalize
Impact
- Address comparisons could fail unexpectedly
- Same address in different cases treated as different
- Potential security issues with allowlists/blocklists
Recommendation
- Create a
normalizeAddress()helper function - Use it consistently throughout the codebase
- Consider using checksummed addresses (EIP-55) as canonical form
export function normalizeAddress(address: string): Address {
// Validate and return checksummed address
if (!isValidAddress(address)) {
throw new InvalidAddressError(address);
}
return toChecksumAddress(address) as Address;
}
Priority
High - Correctness issue
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review src/protocol/account.ts at lines 231, 236, and 268, then search the codebase for other address comparison points. The work is done when address comparisons use a consistent normalization approach, including validation and checksummed canonicalization if adopted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100