feat: add CashTokensFullView and integrate into MainNavigator#27123
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. |
d249540 to
9dfd447
Compare
9dfd447 to
ff749b2
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #27123 +/- ##
===========================================
- Coverage 81.68% 57.91% -23.78%
===========================================
Files 4652 4665 +13
Lines 121697 122035 +338
Branches 26740 26830 +90
===========================================
- Hits 99412 70677 -28735
- Misses 15369 45542 +30173
+ Partials 6916 5816 -1100 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @PatrykLucka 👋. Some notes from testing:
|
|
Hey @Matt561
|
|
Hey @Matt561 @PatrykLucka ! Jumping in here testing build 3607 that you generated yesterday @PatrykLucka.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| ); | ||
| return; | ||
| } | ||
| } |
There was a problem hiding this comment.
Get mUSD button silently no-ops when payment token is missing
High Severity
In handleGetMusdPress, when hasConvertibleTokens is true but getPaymentTokenForSelectedNetwork() returns null, the function logs an error and returns early — it never reaches the isMusdBuyableOnAnyChain branch that would call goToBuy. Since canGetMusd = hasConvertibleTokens || isMusdBuyableOnAnyChain, the button is visible and tappable, but pressing it does nothing, which matches the PR reviewer-reported bug "Get mUSD is pressable but is not navigating anywhere."
|
FYI -> Just spoke with @juanmigdr on all the Product related concerns. We are all good on those |
@juanmigdr I believe this is because it's an aggregated balance and not a standard token row. |
| import { useNavigation } from '@react-navigation/native'; | ||
| import { useSelector } from 'react-redux'; | ||
| import { Box } from '@metamask/design-system-react-native'; | ||
| import SectionTitle from '../../components/SectionTitle'; |
There was a problem hiding this comment.
@PatrykLucka is this a new component that needs to be included in a commit?
SectionTitle was removed when PR #26976 merged (replaced by SectionHeader in component-library/components-temp). Update the import and JSX usage to fix the build.
| targetSdkVersion rootProject.ext.targetSdkVersion | ||
| versionName "7.70.0" | ||
| versionCode 3607 | ||
| versionCode 3992 |
There was a problem hiding this comment.
Can we revert changes around build number?
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No controller/Engine-level changes detected, so network, identity, snaps, or multi-chain API tags are not required. Overall risk is medium due to core homepage and navigation changes that could indirectly affect multiple user flows. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|








Description
What is the reason for the change?
The redesigned homepage needs a dedicated Cash section as the first section, surfacing mUSD (MetaMask USD) and guiding users to convert stablecoins and claim bonuses.
What is the improvement/solution?
CashTokensFullView) that shows only mUSD positions across supported networks (Ethereum Mainnet, Linea). When the user has no mUSD, the screen renders the same Get mUSD empty state (handled byCashTokensFullViewviauseMusdBalance); when the user has mUSD, it rendersTokenswithshowOnlyMusd. Same network filter as the main token list; no add-token or sort. No mUSD-specific empty-state logic insideTokens.Tokenssupports ashowOnlyMusdprop (filter list to mUSD, hide add/sort in control bar);TokenListControlBarsupportsshowAddTokenandhideSort. Empty state componentCashGetMusdEmptyStateis used on the homepage (inCashSection) and inCashTokensFullView; token row usesNavigationServiceto navigate to Token Details. New routeCASH_TOKENS_FULL_VIEWand screen registration. Uses design-system components. Cash section does not expose a refresh ref (no-op removed).Changelog
CHANGELOG entry: Added a Cash section on the homepage that shows aggregated mUSD balance, annualized bonus copy for stablecoin holders, and a dedicated Cash token list view with network filter.
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-527
Manual testing steps
Screenshots/Recordings
Before
After
musd-section.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds new navigation routes and conditional token filtering (including excluding mUSD from main lists) gated by feature flags/geo eligibility, which could affect token visibility and analytics. Also changes fiat formatting to use
currencyDisplay: 'narrowSymbol', which may alter currency rendering across the app.Overview
Introduces a new Cash (mUSD) surface: a
CashSectionis added as the first homepage section when mUSD conversion is enabled and geo-eligible, showing either an aggregated mUSD row (with optional Claim bonus) or a Get mUSD empty state that deep-links to mUSD details and routes users into buy/convert flows with newhome_cash_sectionanalytics location.Adds a dedicated
CashTokensFullViewroute/screen and extendsTokens/TokenListControlBarto support an mUSD-only list (showOnlyMusd) that hides add-token/sort and uses cash-specific empty state messaging; when the Cash section is rendered, mUSD is filtered out of the main tokens lists (including popular tokens) to avoid duplication.Updates mUSD-related token list items to show a non-clickable green
"3% bonus"label for mUSD when no claimable reward exists (only when conversion + geo eligibility are true), expands/adjusts unit tests and snapshots accordingly, and tweaksformatFiatto preferIntlnarrow currency symbols.Written by Cursor Bugbot for commit cc3ad61. This will update automatically on new commits. Configure here.