refactor(earn): use MMDS HeaderStandard#29702
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|



Description
This change replaces the temporary
HeaderCompactStandardcomponent withHeaderStandardfrom@metamask/design-system-react-nativeon Earn-related surfaces.Reason: Align Earn UI with the MetaMask design system and reduce reliance on
component-library/components-tempfor standard headers.What changed:
HeaderStandardis used for the Lending “How it works” bottom sheet, the Earn input screen header (back button and end actions), and the Earn token list bottom sheet. Behavior is intended to match the previous header (title, back/close, analytics-related tests unchanged aside from naming). Unit test comments and adescribeblock name were updated to referenceHeaderStandard.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-699
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk refactor that swaps a temporary header component for the design-system header on a few Earn screens; main regression risk is minor UI/interaction differences in back/close and end-icon rendering.
Overview
Updates Earn surfaces to use the design-system
HeaderStandardinstead of the temporaryHeaderCompactStandard, including the Lending “How it works” bottom sheet, theEarnInputViewscreen header (back + optional info icon), and the Earn token list bottom sheet (close button + title).Adjusts imports accordingly (including
IconNameusage from the design system) and updates unit test descriptions/comments to referenceHeaderStandardwhile keeping behavioral assertions the same.Reviewed by Cursor Bugbot for commit c517a2e. Bugbot is set up for automated code reviews on this repo. Configure here.