Skip to content

Feat/1191 locale based value seperators - #1383

Draft
sneurlax wants to merge 4 commits into
stagingfrom
feat/1191-locale-based-value-seperators
Draft

Feat/1191 locale based value seperators#1383
sneurlax wants to merge 4 commits into
stagingfrom
feat/1191-locale-based-value-seperators

Conversation

@sneurlax

Copy link
Copy Markdown
Member

Closes #1191

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.83%. Comparing base (8208fe7) to head (33f5647).
⚠️ Report is 19 commits behind head on staging.

Files with missing lines Patch % Lines
lib/widgets/eth_fee_form.dart 0.00% 54 Missing ⚠️
lib/utilities/amount/amount_input_formatter.dart 0.00% 26 Missing ⚠️
lib/pages/buy_view/buy_form.dart 0.00% 22 Missing ⚠️
lib/pages/send_view/sol_token_send_view.dart 0.00% 15 Missing ⚠️
lib/pages/send_view/token_send_view.dart 0.00% 9 Missing ⚠️
lib/pages/send_view/send_view.dart 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1383      +/-   ##
===========================================
- Coverage     4.84%    4.83%   -0.01%     
===========================================
  Files         1092     1092              
  Lines       109141   109201      +60     
===========================================
  Hits          5283     5283              
- Misses      103858   103918      +60     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:55
Both files predate the current dart formatter, which fails CI's check of
the files a change touches.
Amount input grouped every three digits and, on a paste, simply dropped
the locale's group separator, so an amount copied from a differently
formatted locale silently changed value: pasting de_DE's 1.234,56 into an
en_US field left 1.23456.

Group with the locale's own pattern, including the 3/2 Indian one, keep
its decimal separator, canonicalize the space separators, and resolve a
bulk edit's foreign separators deterministically - local grouping wins
where the digits form valid groups, otherwise a lone foreign separator
reads as the decimal point. Anything else is rejected outright.

Util.getSymbolsFor's last fallback took the region out of a locale string,
so every *_IN locale resolved to Indonesian symbols and an unknown two
letter locale threw RangeError.
The three transaction fee selection sheets parsed their amount with
Decimal.tryParse, which cannot read the grouped text the amount field
holds, so the sheet fell back to zero for any amount long enough to be
grouped and sized its fee estimates against nothing.
Neither field had an amount input formatter and both parsed raw Decimal
text, so a grouped or comma decimal amount was rejected or misread, and a
buy quote threw on Decimal.parse instead of reporting an invalid amount.

The buy amount is denominated in the crypto being bought, which need not
be the wallet's coin and is absent entirely on desktop, so resolve the
currency from that selection; with none, fail closed rather than reading a
crypto amount with the two decimal fiat parser.
@sneurlax
sneurlax force-pushed the feat/1191-locale-based-value-seperators branch from 25cc980 to ba77c49 Compare August 25, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please interpret commas (not only dots) when pasting amounts

1 participant