AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 59 Monero

fix desktop token amount parsing

Public commit record

What the developer wrote

Authored by Julian

45/100 · Thin
fix desktop token amount parsing
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes how Stack Wallet's desktop app parses token amounts for Solana tokens and other tokens. Previously, the app used simple string replacement for commas and periods, which could misinterpret numbers depending on the user's locale. For example, in some countries '1,000' means one thousand, while in others it means one. The fix uses locale-aware parsing and rejects inputs containing plus, minus, or space characters. The change also affects how displayed amounts are formatted, using the token's own decimal places instead of the coin's.

Recommended action

Review the new parseDesktopSolTokenAmount and parseDesktopTokenFiatAmount helpers for completeness; ensure similar ad-hoc parsing does not exist in mobile token send flows or other desktop token pages. Consider adding tests for empty strings, multiple separators, and very large inputs.

Security signals we found

01

Locale-aware amount parsing replaces unsafe comma/period string replacement

02

Rejection of plus, minus, and whitespace characters in amount inputs

03

Token-specific decimal handling instead of coin-level decimal handling

04

New unit test covers locale-sensitive parsing edge cases

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.