fix(money): show projected 1-year balance in USD (MUSD-1173) cp-8.3.0#33333
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The change is entirely contained within SmokeMoney is the appropriate tag as this component is part of the MetaMask Card Add Funds / deposit flow. No other flows (confirmations, swaps, network, accounts) are affected. No shared infrastructure components are touched. Performance Test Selection: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33333 +/- ##
==========================================
+ Coverage 84.37% 84.39% +0.01%
==========================================
Files 6127 6132 +5
Lines 163530 163729 +199
Branches 39887 39925 +38
==========================================
+ Hits 137974 138173 +199
+ Misses 16050 16044 -6
- Partials 9506 9512 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



Description
The "Projected 1-year balance" text on the Money crypto deposit screen now always displays the amount in USD with the
$symbol, matching every other Money account surface.Bug: with a non-USD preferred display currency selected (e.g. EUR), the projection rendered with that currency's symbol (
1.040,00 €) even though the underlying value is USD-denominated — the deposit amount on this screen is a dollar input (the same value feedsReceiveRowasinputAmountUsd), so the number was correct but mislabelled.Fix:
BalanceProjectionno longer formats viauseFiatFormatter(which stamps the user's selected currency onto the raw number); it renders throughmoneyFormatUsd(en-US, USD) — the same pattern used by Money activity rows and the Money toasts (#33330). This also removes the component's only Redux currency dependency, so it is structurally incapable of rendering a non-USD symbol.Changelog
CHANGELOG entry: Fixed the projected 1-year balance on the Money deposit screen to always display in USD ($) instead of the user's preferred fiat currency
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MUSD-1173
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Localized display-only change in one Money component with updated unit tests; no payment, auth, or balance calculation logic changes.
Overview
BalanceProjection on the Money crypto deposit screen now formats the projected balance with
moneyFormatUsdinstead ofuseFiatFormatter, so the label always shows USD with$(e.g.$1,040.00) even when the user’s preferred display currency is something else.Tests drop the fiat-formatter mock, update expected strings for en-US grouping, and add coverage that euro symbols are not shown for the projection.
Reviewed by Cursor Bugbot for commit 05613a5. Bugbot is set up for automated code reviews on this repo. Configure here.