feat(money): Money Hub polish bundle (MUSD-728/729/730/731/732/733)#29548
Conversation
Bundle of small Money Hub UX changes: - MUSD-728: Drop the inline 'Learn more' CTA from MoneyConvertStablecoins so the Convert section ends after the feature tags / per-token rows. - MUSD-729: Money Hub balance heading reads 'Your balance' instead of 'Money'; standalone '3% bonus' label removed from mUSD rows in the homepage token list (the row falls back to the standard percentage rail; the 'Get 3% mUSD bonus' Convert CTA is kept where it applies). - MUSD-730: AssetOverviewClaimBonus claim button switches from primary to secondary styling (no logic change). - MUSD-731: No code change required — MUSD_CONVERSION_APY constant already drives all '3%' surfaces consistently. - MUSD-732: 5-item checklist (Dollar-backed, No lockups, Daily bonus, MetaMask stablecoins, No MetaMask fee) added to the 'Get 3% on stablecoins' education splash. - MUSD-733: Convert section mounted on the mUSD asset detail page via a new AssetOverviewConvertSection wrapper that reuses MoneyConvertStablecoins; secondary claim CTA from MUSD-730 covers the claim styling requirement.
|
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. |
- CashTokensFullView: header now reads "Money" when Money Hub is on; always shows "Your balance" section heading. - Empty state replaces CashGetMusdEmptyState with a new MoneyMusdEmptyBalanceRow ($0.00 / 0 mUSD on Ethereum mainnet) so the Your balance structure stays consistent; followed by the bonus + convert sections, a divider, and a How it works block. - Tokens / TokenList / TokenListItem: thread a hideSecondaryPriceRow prop. When set on the Money Hub, mUSD rows render a compact vertically-centered name + fiat/native stack with no price/24h-change line. - AssetOverviewClaimBonus: drop the "+" prefix from the estimated annual bonus value (lifetime bonus row unchanged).
- MoneyMusdEmptyBalanceRow: new test suite covers name, fiat/native values, and onPress handler (100% statement/branch/function/line). - CashTokensFullView: add tests for "Your balance" heading visibility, empty mUSD row + How it works rendering, navigation handlers, and Swap/Buy vs Convert footer branching. Brings file coverage to 92/87/ 93/93. - TokenListItem: cover the compact Money Hub mUSD layout that hides the price/24h-change line when hideSecondaryPriceRow is set.
Replaces the in-place Column 2 wrapping with a small early-return branch when hideSecondaryPriceRow && isMusdAsset. Leaves the existing standard layout JSX untouched, cutting the per-file diff from ~289 to ~100 lines and avoiding the indentation churn that the wrapped guard caused.
Cursor Bugbot flagged the Row 2 branch gated on isMusdSurfaceEnabled && shouldShowConvertToMusdCta as unreachable: isMusdSurfaceEnabled is true only when the token IS mUSD, while shouldShowConvertToMusdCta is true only when the token is a stablecoin convertible TO mUSD — the two are mutually exclusive. Removed the dead branch, the now-unused isMusdSurfaceEnabled computation and its supporting hooks/imports, and added a press test covering the compact Money Hub mUSD row navigation.
Merges the Money Hub-enabled CashTokensFullView tests into a single nested describe with a shared beforeEach, and folds the hideSecondaryPriceRow tests into a single render helper. Same behavioural coverage in ~110 fewer changed lines, keeping the PR under the 1000-line max.
|
|
||
| const handleLearnMorePress = useCallback(() => { | ||
| trackEvent( | ||
| createEventBuilder(MetaMetricsEvents.MONEY_HUB_LEARN_MORE_PRESSED) |
There was a problem hiding this comment.
Let's delete the MONEY_HUB_LEARN_MORE_PRESSED event from the MetaMetricsEvents since it's not used anymore (here).
Could you please also create a ticket to remove this event from the segment-schema repo. Currently, this repo is the source of truth for all client emitted events - segment-schema repo.
We'll want to delete this file as part of this PR's changes.
There was a problem hiding this comment.
Unfortunately, I can't push to that repo (ro for me)
There was a problem hiding this comment.
Please reach out to techops for permission. Mention you're an external contractor with Margelo.
| const handleHowItWorksPress = useCallback(() => { | ||
| navigation.navigate(Routes.MONEY.HOW_IT_WORKS as never); | ||
| }, [navigation]); |
There was a problem hiding this comment.
Which Jira ticket requests this change?
| style={tw`p-4`} | ||
| twClassName="h-auto" | ||
| > | ||
| {strings('homepage.sections.cash')} |
There was a problem hiding this comment.
Let's create a ticket to rename the "cash" translation keys to "money".
| {isMoneyHubEnabled ? ( | ||
| <MoneyMusdEmptyBalanceRow onPress={handleEmptyMusdRowPress} /> | ||
| ) : ( | ||
| <SectionRow> | ||
| <CashGetMusdEmptyState isFullView /> | ||
| </SectionRow> | ||
| )} |
There was a problem hiding this comment.
Which Jira ticket requests these changes? If we do want these changes, is there an existing component we can use instead of creating this bespoke one for the empty balance state?
- Drop dead MONEY_HUB_LEARN_MORE_PRESSED MetaMetrics event - Rename CashTokensFullViewTestIds.YOUR_BALANCE_HEADING -> HEADING to decouple test ids from copy - Drop redundant title ternary (homepage.sections.cash and money.title resolve to identical strings) - Remove MoneyHowItWorks block, divider, and Routes.MONEY.HOW_IT_WORKS navigation from CashTokensFullView; that route belongs to the unmounted Money Home stack and would crash at runtime. Drops the unused useMoneyAccountBalance/vaultApyQuery dependency along with it - Internalize max/edit handlers and analytics inside MoneyConvertStablecoins via a new location prop; delete AssetOverviewConvertSection wrapper and use MoneyConvertStablecoins directly from AssetOverviewContent so the asset detail surface gets analytics parity with Money Hub - Add ASSET_DETAIL to MONEY_EVENTS_CONSTANTS.EVENT_LOCATIONS
- Replace the vertical checklist with a horizontal feature-tag pill row reusing the same TagBase + IconName.CheckBold pattern as MoneyConvertStablecoins, so the splash matches the design - Reorder the splash to: heading -> tag pills -> coin image -> short description with terms link -> buttons (was: heading -> long description -> vertical checklist -> coin image -> buttons)
Replace component-library Text and Button with DSRN equivalents and swap raw RN <View> wrappers for DSRN Box with twClassName. Camp-cleanup of component-library usage in a file already touched by this PR; TagBase is retained because DSRN Tag lacks startAccessory + Rectangle shape support.
Prithpal-Sooriya
left a comment
There was a problem hiding this comment.
Assets CO LGTM!
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.
Reviewed by Cursor Bugbot for commit 55603e8. Configure here.
…mpty_state i18n key
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Analytics change: Removal of MONEY_HUB_LEARN_MORE_PRESSED event from MetaMetrics.events.ts is a minor cleanup that removes a no-longer-used event (the Learn More button was removed from MoneyConvertStablecoins). String key renames: Several localization keys were renamed (cash→money prefix), which could break tests that reference old string values. Not selected: SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeAccounts, SmokeIdentity, SmokeBrowser, SmokeSnaps, SmokeMultiChainAPI, SmokePredictions, SmokePerps, SmokeSeedlessOnboarding - these are not affected by these UI/Money Hub changes. Performance Test Selection: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #29548 +/- ##
==========================================
- Coverage 81.97% 81.44% -0.53%
==========================================
Files 5302 5317 +15
Lines 140763 140902 +139
Branches 32047 32095 +48
==========================================
- Hits 115391 114764 -627
- Misses 17517 18262 +745
- Partials 7855 7876 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|





Description
Bundles six small Money Hub UX changes:
MoneyConvertStablecoins. The Convert section ends after the feature tags / per-token rows; only the primary action remains.AssetOverviewClaimBonusclaim button switches from primary to secondary styling (no logic change).MUSD_CONVERSION_APYconstant already drives every "3%" surface consistently. No outdated/conflicting variants remain.Dollar-backed,No lockups,Daily bonus,MetaMask stablecoins,No MetaMask fee) added to the Get 3% on stablecoins education splash with green checkmarks.AssetOverviewConvertSectionwrapper that reusesMoneyConvertStablecoins. The component already supports the three target states (no-mUSD informational, has-mUSD with stablecoins per-token rows, has-mUSD without stablecoins informational). The secondary claim CTA from MUSD-730 covers the claim-styling requirement.Changelog
CHANGELOG entry: null
Related issues
Fixes: MUSD-728, MUSD-729, MUSD-730, MUSD-731, MUSD-732, MUSD-733
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk: refactors conversion UI wiring and token list rendering paths (including a new compact mUSD layout and new analytics events/locations), which could affect navigation and tracking if misconfigured.
Overview
Money Hub UX polish for mUSD conversion and balances. The Convert section (
MoneyConvertStablecoins) is simplified by removing the inline Learn more CTA and now self-manages token fetching plus conversion initiation, emittingMONEY_HUB_TOKEN_ROW_CONVERT_CLICKEDanalytics with a passed-inlocation.mUSD balance presentation is adjusted across Money surfaces.
CashTokensFullViewadds a "Your balance" heading when Money Hub is enabled, introduces a newMoneyMusdEmptyBalanceRowfor the zero-balance state, and passes a newhideSecondaryPriceRowflag throughTokens/TokenListto render a compact mUSD row without the price/percentage rail. Separately, mUSD token list items no longer show the standalone green"3% bonus"secondary label.Other small UI/text tweaks.
AssetOverviewClaimBonusswitches its CTA button toSecondarystyling and removes the leading+from the estimated annual bonus display; the mUSD education screen is redesigned to use design-system components, adds a 5-item checklist, and removes the external “Terms apply” link while updating the education copy and i18n keys (cash → money, new checklist strings, newmoney.your_balance).Reviewed by Cursor Bugbot for commit 6696fdc. Bugbot is set up for automated code reviews on this repo. Configure here.