Round fiat balances to cents in Wallets list#6087
Closed
j0ntz wants to merge 2 commits into
Closed
Conversation
The Wallets list row balance used the auto-expanding fiat precision meant for unit prices, showing up to 6 decimals for sub-$1 balances. Cap it at 2 decimals to match the wallet detail scene's rounding.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
6 tasks
Contributor
Author
|
Superseded by #6105, which consolidates this and 11 other small GUI task branches into one PR/branch per the umbrella task's instructions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fiat balances in the Wallets list (Assets tab) were auto-expanding to 3-6 decimal places for sub-$1 balances (e.g.
$0.000018,$0.635), instead of rounding to cents like the wallet detail scene does ($0.01 EUR). The list row's balance<FiatText>relied on the defaultautoPrecisionbehavior meant for showing tiny unit prices legibly, not for a final balance total.Fix: pass
autoPrecision={false}to the balance<FiatText>inWalletListCurrencyRow.tsxso it renders at the standard 2-decimal precision, matching the detail scene. The sibling per-unit price<FiatText>in the same row is untouched and still auto-expands, since that's intentional for tiny unit prices.Limit fiat amounts to 2 decimals in Wallets list
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Tested on the iOS simulator only (screenshot attached below). The change is in a platform-agnostic shared RN component (
WalletListCurrencyRow.tsx/useFiatText), so it applies identically on Android; not separately verified on an Android device or on small/large-screen form factors.Note
Low Risk
Single prop on a shared list row with no auth, payment, or data-layer changes.
Overview
Wallet list fiat balances now show standard two-decimal amounts (e.g.
$0.01) instead of auto-expanded precision for tiny totals (e.g.$0.000018), aligning the Assets tab with the wallet detail scene.The change sets
autoPrecision={false}on the balanceFiatTextinWalletListCurrencyRow; the per-unit fiat price in the same row still uses default auto-precision for small unit prices. A CHANGELOG entry was added under Unreleased.Reviewed by Cursor Bugbot for commit 4a06bf8. Bugbot is set up for automated code reviews on this repo. Configure here.