Skip to content

feat(money): Money Hub polish bundle (MUSD-728/729/730/731/732/733)#29548

Merged
Kureev merged 27 commits into
mainfrom
kureev/MUSD-728-733-money-hub-polish
May 6, 2026
Merged

feat(money): Money Hub polish bundle (MUSD-728/729/730/731/732/733)#29548
Kureev merged 27 commits into
mainfrom
kureev/MUSD-728-733-money-hub-polish

Conversation

@Kureev

@Kureev Kureev commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

Bundles six small Money Hub UX changes:

  • MUSD-728 — Drop the inline Learn more CTA from MoneyConvertStablecoins. The Convert section ends after the feature tags / per-token rows; only the primary action remains.
  • MUSD-729 — Money Hub balance heading reads Your balance (replacing the duplicate "Money" inline title; the page header still shows "Money"). Standalone "3% bonus" label removed from mUSD rows in the homepage token list — the row falls back to the standard percentage rail when there's no Convert CTA.
  • MUSD-730AssetOverviewClaimBonus claim button switches from primary to secondary styling (no logic change).
  • MUSD-731 — No code change required: the existing MUSD_CONVERSION_APY constant already drives every "3%" surface consistently. No outdated/conflicting variants remain.
  • MUSD-732 — Five-item checklist (Dollar-backed, No lockups, Daily bonus, MetaMask stablecoins, No MetaMask fee) added to the Get 3% on stablecoins education splash with green checkmarks.
  • MUSD-733 — Mounts the Convert section on the mUSD asset detail page via a new AssetOverviewConvertSection wrapper that reuses MoneyConvertStablecoins. 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

Feature: Money Hub polish

  Scenario: Money Hub Convert section (MUSD-728)
    Given I open the Money Hub
    Then the Convert to mUSD section ends after the feature tags or per-token rows
    And no "Learn more" button is rendered

  Scenario: Money Hub balance heading (MUSD-729)
    Given I open the Money Hub
    Then the balance section heading reads "Your balance"

  Scenario: mUSD token row label (MUSD-729)
    Given I view the wallet token list with mUSD on Mainnet/Linea
    Then the mUSD row no longer renders the green "3% bonus" label
    And the row falls back to the standard percentage rail when no Convert CTA applies

  Scenario: Asset detail claim button (MUSD-730)
    Given I open the mUSD asset detail page with a claimable bonus
    Then the "Claim" button uses secondary button styling

  Scenario: Education splash checklist (MUSD-732)
    Given I view the "Get 3% on stablecoins" education splash
    Then I see a checklist with: Dollar-backed, No lockups, Daily bonus, MetaMask stablecoins, No MetaMask fee
    And each item shows a green check icon

  Scenario: Asset detail Convert module (MUSD-733)
    Given I open the mUSD asset detail page
    And mUSD conversion is enabled and I am geo-eligible
    Then a Convert section renders below the claim card
    And it shows per-token rows for any eligible stablecoins, or the empty/info layout otherwise

Screenshots/Recordings

image image image

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

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, emitting MONEY_HUB_TOKEN_ROW_CONVERT_CLICKED analytics with a passed-in location.

mUSD balance presentation is adjusted across Money surfaces. CashTokensFullView adds a "Your balance" heading when Money Hub is enabled, introduces a new MoneyMusdEmptyBalanceRow for the zero-balance state, and passes a new hideSecondaryPriceRow flag through Tokens/TokenList to 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. AssetOverviewClaimBonus switches its CTA button to Secondary styling 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, new money.your_balance).

Reviewed by Cursor Bugbot for commit 6696fdc. Bugbot is set up for automated code reviews on this repo. Configure here.

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.
@github-actions

Copy link
Copy Markdown
Contributor

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.

@Kureev Kureev self-assigned this Apr 30, 2026
- 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).
@github-actions github-actions Bot added size-L and removed size-M labels Apr 30, 2026
- 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.
@github-actions github-actions Bot added size-XL and removed size-L labels Apr 30, 2026
@Kureev Kureev marked this pull request as ready for review April 30, 2026 13:28
@Kureev Kureev requested review from a team as code owners April 30, 2026 13:28
Comment thread app/components/UI/Tokens/TokenList/TokenListItem/TokenListItem.tsx Outdated
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.
@github-actions github-actions Bot added size-L and removed size-XL labels Apr 30, 2026
Kureev added 2 commits April 30, 2026 15:44
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.
@github-actions github-actions Bot added size-XL and removed size-L labels Apr 30, 2026
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.
@github-actions github-actions Bot added size-L and removed size-XL labels Apr 30, 2026

const handleLearnMorePress = useCallback(() => {
trackEvent(
createEventBuilder(MetaMetricsEvents.MONEY_HUB_LEARN_MORE_PRESSED)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I can't push to that repo (ro for me)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reach out to techops for permission. Mention you're an external contractor with Margelo.

Comment thread app/components/Views/CashTokensFullView/CashTokensFullView.tsx Outdated
Comment on lines +84 to +86
const handleHowItWorksPress = useCallback(() => {
navigation.navigate(Routes.MONEY.HOW_IT_WORKS as never);
}, [navigation]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which Jira ticket requests this change?

Comment thread app/components/Views/CashTokensFullView/CashTokensFullView.tsx Outdated
style={tw`p-4`}
twClassName="h-auto"
>
{strings('homepage.sections.cash')}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's create a ticket to rename the "cash" translation keys to "money".

Comment on lines +382 to +388
{isMoneyHubEnabled ? (
<MoneyMusdEmptyBalanceRow onPress={handleEmptyMusdRowPress} />
) : (
<SectionRow>
<CashGetMusdEmptyState isFullView />
</SectionRow>
)}

@Matt561 Matt561 Apr 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread app/components/Views/CashTokensFullView/CashTokensFullView.tsx Outdated
Comment thread app/components/UI/Earn/Views/EarnMusdConversionEducationView/index.tsx Outdated
Comment thread app/components/Views/CashTokensFullView/CashTokensFullView.testIds.ts Outdated
- 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
@github-actions github-actions Bot added size-XL and removed size-L labels Apr 30, 2026
- 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)
Kureev added 4 commits May 6, 2026 13:23
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.
@Kureev

Kureev commented May 6, 2026

Copy link
Copy Markdown
Contributor Author
image

@Kureev Kureev requested a review from Matt561 May 6, 2026 17:48

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assets CO LGTM!

Matt561
Matt561 previously approved these changes May 6, 2026
@Kureev Kureev added this pull request to the merge queue May 6, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch May 6, 2026
@Kureev Kureev dismissed stale reviews from Matt561 and Prithpal-Sooriya via 55603e8 May 6, 2026 21:53
@Kureev Kureev requested review from Matt561 and Prithpal-Sooriya May 6, 2026 21:54

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread locales/languages/en.json
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeMoney, SmokeStake, SmokeConfirmations, SmokeWalletPlatform, SmokeSwap
  • Selected Performance tags: @PerformanceAssetLoading
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The PR makes significant UI changes to the Money Hub (mUSD/stablecoin) ecosystem:

  1. SmokeMoney (primary): Direct changes to Money Hub components - MoneyBalanceCard (string key rename), MoneyBalanceSummary (new "Your balance" heading), MoneyConvertStablecoins (major refactor: self-contained, removes Learn More button), MoneyMusdEmptyBalanceRow (new component), CashTokensFullView (major refactor with new empty state, hideSecondaryPriceRow prop, heading), CashSection (string rename cash→money). These are core Money Hub UI changes.

  2. SmokeStake (direct impact): EarnMusdConversionEducationView is redesigned (removes Terms of Use link, adds checklist tags, updates button styles), AssetOverviewClaimBonus changes button variant and removes '+' prefix from bonus display. These are Earn/staking-adjacent flows.

  3. SmokeConfirmations (required by tag descriptions): Both SmokeMoney and SmokeStake tag descriptions require SmokeConfirmations to be selected alongside them, as conversion/deposit flows involve on-chain transactions.

  4. SmokeWalletPlatform (indirect impact): TokenListItem has significant rendering changes (removes mUSD bonus row conditional, adds hideSecondaryPriceRow compact layout), propagated through TokenList and Tokens components. These affect the main wallet token list which is used in the wallet home view. Also required alongside SmokeMoney per tag description.

  5. SmokeSwap (required by tag description): SmokeMoney tag description states 'When selecting SmokeMoney for Card Add Funds or similar flows that execute swaps, also select SmokeSwap'. The MoneyConvertStablecoins component handles stablecoin conversion which involves swap-like flows.

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:
The TokenListItem component has significant rendering changes - it removes the mUSD bonus row conditional branch and adds a new compact layout path (hideSecondaryPriceRow). These changes affect how every token row renders in the main wallet token list, which could impact asset loading and list rendering performance. @PerformanceAssetLoading covers token list rendering and balance display which is directly affected by these TokenListItem changes.

View GitHub Actions results

@Kureev Kureev enabled auto-merge May 6, 2026 22:12
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.54545% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.44%. Comparing base (dba2c63) to head (6696fdc).
⚠️ Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
...oneyConvertStablecoins/MoneyConvertStablecoins.tsx 75.00% 2 Missing and 2 partials ⚠️
...I/Tokens/TokenList/TokenListItem/TokenListItem.tsx 66.66% 0 Missing and 3 partials ⚠️
...I/TokenDetails/components/AssetOverviewContent.tsx 50.00% 0 Missing and 2 partials ⚠️
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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

@Kureev Kureev added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 1de00bb May 6, 2026
101 of 102 checks passed
@Kureev Kureev deleted the kureev/MUSD-728-733-money-hub-polish branch May 6, 2026 22:36
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 size-XL team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants