Skip to content

refactor(toast): migrate earn toasts to the design system - #34826

Draft
amandaye0h wants to merge 2 commits into
mainfrom
migrate/earn-toasts
Draft

refactor(toast): migrate earn toasts to the design system#34826
amandaye0h wants to merge 2 commits into
mainfrom
migrate/earn-toasts

Conversation

@amandaye0h

@amandaye0h amandaye0h commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Earn still showed notifications through the legacy ToastContext showToast API. This PR switches useEarnToasts to the design-system toast() API so Earn flows share the same toaster as the rest of the toast migration.

Copy now maps to title / description, success and error use ToastSeverity icons, and in-progress still uses the spinner accessory. Close is handled by the design-system toaster. The Money toast migration lives on migrate/use-money-toasts.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Refs: No tracking issue; continues the design-system toast migration for Earn flows

Manual testing steps

Feature: Earn design-system toasts

  Background:
    Given I am logged into MetaMask Mobile

  Scenario: user sees an Earn mUSD conversion toast
    Given I can convert a token to mUSD

    When user confirms an mUSD conversion
    Then an in-progress toast appears with a spinner
    And a success or failure toast replaces it when the transaction settles
    And the toast can be dismissed with the design-system close control

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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.

Replace ToastContext showToast in Earn and Money hooks with the
design-system toast() API so those flows share the same toaster.

Co-authored-by: Cursor <cursoragent@cursor.com>
@amandaye0h amandaye0h self-assigned this Aug 14, 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.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Aug 14, 2026
@metamask-ci metamask-ci Bot added the team-design-system All issues relating to design system in Mobile label Aug 14, 2026
Move the Money toast migration onto migrate/use-money-toasts so this
branch only changes Earn notifications.

Co-authored-by: Cursor <cursoragent@cursor.com>
@amandaye0h amandaye0h changed the title refactor(toast): migrate earn and money toasts to the design system refactor(toast): migrate earn toasts to the design system Aug 14, 2026
@github-actions github-actions Bot added size-L and removed size-XL labels Aug 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-L team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant