lambdaclass / lambdaclass/eth-agent
Missing input validation for stablecoin amounts
Open
Nobody has claimed this yet.
bug
medium-priority
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
parseStablecoinAmount is called without validating that amount is a valid number string first.
Location
src/agent/wallet.ts:542
Recommendation
- Validate amount format before parsing
- Throw InvalidAmountError with clear message for malformed input
- Handle edge cases: empty string, whitespace, special characters
Priority
Medium - Input validation
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
Start by reading src/agent/wallet.ts at line 542 and trace how parseStablecoinAmount receives amount. Done means malformed empty, whitespace, and special-character inputs are rejected with InvalidAmountError and a clear message before parsing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100