Skip to content

fix: use push navigation for Bridge asset details#26123

Merged
bfullam merged 1 commit intomainfrom
swaps-4107-fix-asset-navigation
Feb 16, 2026
Merged

fix: use push navigation for Bridge asset details#26123
bfullam merged 1 commit intomainfrom
swaps-4107-fix-asset-navigation

Conversation

@bfullam
Copy link
Contributor

@bfullam bfullam commented Feb 16, 2026

Description

This PR fixes a swaps token-info navigation bug where tapping the info icon in the token selector could open the wrong asset details screen.

Root cause:

  • In BridgeTokenSelector, info-icon navigation used navigate('Asset', params).
  • When swaps was entered from an existing asset details route, React Navigation could reuse that existing Asset route instance, resulting in stale params (the entry token) instead of the tapped token.

Fix:

  • Switched info-icon navigation to navigation.dispatch(StackActions.push('Asset', params)) so a fresh Asset route is always created with the tapped token params.
  • Kept analytics tracking behavior unchanged.
  • Updated unit test assertions to validate a PUSH action with correct token params.

Changelog

CHANGELOG entry: Fixed a bug where tapping a token’s info icon in Swaps could open the wrong asset details page.

Related issues

Fixes: SWAPS-4107

Manual testing steps

Feature: Swaps token info navigation opens correct asset details

  Scenario: Open swaps from asset details and inspect another token
    Given I am on any token asset details page
    When I tap "Swap"
    And I open the token selector
    And I tap the info icon for a different token
    Then the asset details page opens for the tapped token
    And not for the original token I started from

  Scenario: Open swaps from a non-asset-details entrypoint
    Given I open swaps from home/wallet actions
    When I open the token selector
    And I tap the info icon for a token
    Then the asset details page opens for that tapped token

Screenshots/Recordings

Before

Behavior reproduced in Jira recording attached to SWAPS-4107 (wrong token details opened).

After

Pending fresh verification recording showing tapped token details open correctly on iOS and Android.

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.

@bfullam bfullam requested a review from a team as a code owner February 16, 2026 13:30
@github-actions
Copy link
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-swaps-and-bridge Swaps and Bridge team label Feb 16, 2026
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are in the BridgeTokenSelector component, which is part of the Bridge feature. The modification changes navigation behavior from navigation.navigate('Asset') to navigation.dispatch(StackActions.push('Asset')) to ensure a fresh Asset route is always pushed instead of potentially reusing an existing route with stale params. This is a targeted navigation fix with corresponding test updates. SmokeTrade is selected because it covers cross-chain bridging functionality. SmokeConfirmations is included as per the tag guidance that bridge flows require confirmations testing.

Performance Test Selection:
This change is purely a navigation stack management fix (using push instead of navigate). It does not affect UI rendering, data loading, or any performance-sensitive operations. No performance tests are needed.

View GitHub Actions results

@bfullam bfullam changed the title Use push navigation for Bridge asset details fix: use push navigation for Bridge asset details Feb 16, 2026
@sonarqubecloud
Copy link

@bfullam bfullam added this pull request to the merge queue Feb 16, 2026
Merged via the queue into main with commit 751e326 Feb 16, 2026
186 of 195 checks passed
@bfullam bfullam deleted the swaps-4107-fix-asset-navigation branch February 16, 2026 15:17
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-S team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants