refactor: remove unused styles and simplify PhoneCountrySelectorModal…#33350
Conversation
|
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:
This is a UI-only refactoring of the phone country selector modal within the Ramp (fiat on/off-ramp) flow. The same data is displayed and the same interactions are preserved — only the rendering approach changed to use component library built-ins. No functional behavior changes, no controller/state changes, no navigation changes. The SmokeMoney tag covers MetaMask Card and fiat on/off-ramp flows, which includes the phone country selector modal used during ramp flows. This is the only relevant tag. No other flows (confirmations, swaps, accounts, etc.) are affected by this change. Performance Test Selection: |
|



Description
Simplifies the layout of
PhoneCountrySelectorModalin the Ramp flow. The country row was previously built from a customListItemColumn+ nestedView/Textcomposition with a dedicated stylesheet. It now uses the built-inListItemSelectprops instead:startAccessoryfor the flag emoji,titlefor the country name, anddescriptionfor the phone prefix.This removes
PhoneCountrySelectorModal.styles.tsentirely along with theuseStyleshook usage, drops the unused custom styles, and shrinks the render callback's dependency list. No behavior change: the modal renders the same flag, country name, and dialing prefix per row.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TRAM-3579
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
Presentational refactor in a single Ramp modal with no logic or data-flow changes.
Overview
Refactors Ramp phone country selector rows to use design-system
ListItemSelectinstead of a customListItemColumn+ nestedViewlayout.Deletes
PhoneCountrySelectorModal.styles.tsand dropsuseStyles,View, and component-library list column imports. Each row now sets flag viastartAccessory, country name viatitle/titleProps, and dialing prefix viadescription/descriptionProps. Search, selection, and sheet behavior are unchanged; the render callback dependency list no longer includes style objects.Reviewed by Cursor Bugbot for commit 2286344. Bugbot is set up for automated code reviews on this repo. Configure here.