lambdaclass / lambdaclass/eth-agent

Missing input validation for stablecoin amounts

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.