Skip to content

fix(ramp): Navigate to token list on close unavailable modal#27297

Merged
amitabh94 merged 7 commits into
MetaMask:mainfrom
imyugioh:feat/ramp-navigate-to-token-list-on-close-unavailable-modal
Mar 10, 2026
Merged

fix(ramp): Navigate to token list on close unavailable modal#27297
amitabh94 merged 7 commits into
MetaMask:mainfrom
imyugioh:feat/ramp-navigate-to-token-list-on-close-unavailable-modal

Conversation

@imyugioh

@imyugioh imyugioh commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes the "Token not available with provider" modal so that pressing the close (X) button navigates the user back to the token selection screen instead of leaving them in a stuck state.

Previously, closing the modal did nothing — the bottom sheet dismissed but no navigation occurred, leaving the user on a blank/unresponsive input screen. Now the close button behaves the same as the "Change token" button, sending the user back to the token list.

Changelog

CHANGELOG entry: Fixed a bug where closing the "Token not available" modal left the user in a stuck state instead of navigating back to the token selection screen.

Related issues

Refs: TRAM-3329

Manual testing steps

Feature: Token not available modal close behavior

 Scenario: Dismiss provider selection returns to token selection
  Given the "Not available" modal is displayed
  And the user pressed "Change provider"
  When the user taps the deposit screen behind the provider selection modal
  Then the token selection screen is displayed

Scenario: Dismiss token not available modal returns to token selection
  Given the "Not available" modal is displayed
  When the user taps the deposit screen behind the modal
  Then the token selection screen is displayed

Screenshots/Recordings

Before

Screen.Recording.2026-03-10.122119.mp4

After

Screen.Recording.2026-03-10.161542.mp4

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
Small, isolated navigation change on modal dismissal with added test coverage; minimal impact outside the ramp modal flow.

Overview
Fixes ProviderSelectionModal so dismissing the bottom sheet (e.g., tapping outside/close) triggers navigation back to Routes.RAMP.TOKEN_SELECTION when the modal is shown in skipQuotes mode (i.e., no pending post-action).

Updates tests to mock navigate, capture the BottomSheet onClose callback, and assert navigation occurs only for skipQuotes: true and not for the normal quotes flow.

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

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

@imyugioh imyugioh marked this pull request as ready for review March 10, 2026 21:36
@imyugioh imyugioh requested a review from a team as a code owner March 10, 2026 21:36
@amitabh94 amitabh94 enabled auto-merge March 10, 2026 21:38
@amitabh94 amitabh94 added the team-money-movement issues related to Money Movement features label Mar 10, 2026
@amitabh94 amitabh94 added this pull request to the merge queue Mar 10, 2026
Merged via the queue into MetaMask:main with commit 63bd6d1 Mar 10, 2026
68 of 69 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

team-money-movement issues related to Money Movement features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants