Skip to content

refactor(MusdConversionAssetListCta): enhance CTA component with full view support and update event tracking locations#27415

Merged
PatrykLucka merged 2 commits into
mainfrom
TMCU-560-m-usd-token-list-should-trigger-with-location-mobile-token-list
Mar 16, 2026
Merged

refactor(MusdConversionAssetListCta): enhance CTA component with full view support and update event tracking locations#27415
PatrykLucka merged 2 commits into
mainfrom
TMCU-560-m-usd-token-list-should-trigger-with-location-mobile-token-list

Conversation

@PatrykLucka

@PatrykLucka PatrykLucka commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Description

The mUSD Conversion CTA Clicked event in CashGetMusdEmptyState always sent location: 'home_cash_section', even when the CTA was tapped from the full Cash token list page.

This PR adds a new MOBILE_TOKEN_LIST_PAGE event location and an isFullView prop to CashGetMusdEmptyState so the full-page context is reported correctly, while the homepage default (home_cash_section) remains unchanged:

  • CashGetMusdEmptyState — accepts isFullView; sends mobile-token-list-page when true, keeps home_cash_section otherwise.
  • CashTokensFullView — passes isFullView to CashGetMusdEmptyState.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-560

Manual testing steps

Feature: mUSD Conversion CTA location tracking in Cash section

  Scenario: CTA clicked on homepage Cash section keeps home_cash_section location
    Given the user is on the wallet homepage with mUSD conversion enabled
    And the user has no mUSD balance (Cash empty state is shown)

    When user taps the "Get mUSD" button in the Cash section
    Then the mUSD Conversion CTA Clicked event fires with location "home_cash_section"

  Scenario: CTA clicked on full Cash token list page sends mobile-token-list-page location
    Given the user navigates to the full Cash token list page (via ">" from homepage Cash section)
    And the user has no mUSD balance (Cash empty state is shown)

    When user taps the "Get mUSD" button
    Then the mUSD Conversion CTA Clicked event fires with location "mobile-token-list-page"

Screenshots/Recordings

Before

After

Pre-merge author checklist

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

Low Risk
Low risk: limited to analytics metadata and a new optional prop wiring for CashGetMusdEmptyState, with updated unit coverage.

Overview
Updates mUSD conversion CTA analytics so the MUSD_CONVERSION_CTA_CLICKED event reports the correct location when triggered from the full Cash token list page.

Adds EVENT_LOCATIONS.MOBILE_TOKEN_LIST_PAGE and an isFullView prop to CashGetMusdEmptyState, passes it from CashTokensFullView, and extends tests to cover both homepage (home_cash_section) and full-view tracking.

Written by Cursor Bugbot for commit 720ef20. This will update automatically on new commits. Configure here.

@PatrykLucka PatrykLucka self-assigned this Mar 12, 2026
@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.

@metamaskbot metamaskbot added the team-mobile-ux Mobile UX team label Mar 12, 2026
@PatrykLucka PatrykLucka marked this pull request as ready for review March 12, 2026 11:00
@PatrykLucka PatrykLucka requested a review from a team as a code owner March 12, 2026 11:00
@PatrykLucka PatrykLucka force-pushed the TMCU-560-m-usd-token-list-should-trigger-with-location-mobile-token-list branch from 1d56895 to d43ab2f Compare March 12, 2026 12:14
Comment thread app/components/UI/Earn/constants/events/musdEvents.ts
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.90%. Comparing base (2eacab6) to head (d43ab2f).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27415      +/-   ##
==========================================
+ Coverage   81.87%   81.90%   +0.03%     
==========================================
  Files        4691     4699       +8     
  Lines      122275   122610     +335     
  Branches    26947    27052     +105     
==========================================
+ Hits       100109   100429     +320     
+ Misses      15221    15216       -5     
- Partials     6945     6965      +20     

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

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

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@PatrykLucka PatrykLucka force-pushed the TMCU-560-m-usd-token-list-should-trigger-with-location-mobile-token-list branch from 5cfe7cb to 720ef20 Compare March 16, 2026 08:40
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 70%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are limited to UI components and analytics constants related to the Cash/Earn (mUSD) section on the Homepage (CashTokensFullView, CashGetMusdEmptyState, and related event constants). These components are part of the wallet home experience and embedded sections within the main wallet platform. SmokeWalletPlatform covers homepage rendering, embedded sections (like Tokens/Perps/Predictions inside Trending), wallet lifecycle behavior, and core wallet UI flows. Since the changes affect homepage sections and event wiring (mUSD events), this tag is sufficient to validate that the wallet home renders correctly and navigation remains intact. No controller, Engine, network, confirmations, trade execution, or multi-chain logic was modified, so other tags (Trade, Confirmations, Network, Identity, etc.) are not required.

Performance Test Selection:
The changes are limited to UI presentation and event constants for the Cash/Earn section and do not modify performance-critical flows such as app launch, login, onboarding, swaps, asset loading, or large list rendering logic. No controllers, data loading logic, or rendering-heavy components were introduced or significantly altered. Therefore, no performance tests are required.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@PatrykLucka PatrykLucka added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit b5124ce Mar 16, 2026
283 of 288 checks passed
@PatrykLucka PatrykLucka deleted the TMCU-560-m-usd-token-list-should-trigger-with-location-mobile-token-list branch March 16, 2026 12:35
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 16, 2026
@metamaskbot metamaskbot added the release-7.71.0 Issue or pull request that will be included in release 7.71.0 label Mar 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.71.0 Issue or pull request that will be included in release 7.71.0 size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants