Skip to content

fix: network name in token details#25106

Merged
bergarces merged 1 commit intomainfrom
fix-network-name-token-details
Jan 23, 2026
Merged

fix: network name in token details#25106
bergarces merged 1 commit intomainfrom
fix-network-name-token-details

Conversation

@bergarces
Copy link
Copy Markdown
Contributor

@bergarces bergarces commented Jan 23, 2026

Description

Changed code to use exclusively the chain name of the token that is being viewed.

Changelog

CHANGELOG entry: Fixed a bug in the network name for the token detail page

Related issues

Fixes: #25100

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-01-23.at.12.16.49.mp4

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2026-01-23.at.13.02.35.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

Fixes network name display in Asset Details by sourcing it directly from the network configuration for the current chainId.

  • Replace provider/all-networks-based resolution with selectNetworkConfigurationByChainId and networkConfigurationByChainId?.name
  • Remove unused imports/selectors and getNetworkName callback; simplify state selection
  • Use networkName in the inline header and in the "Network" section rendering

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

@bergarces bergarces requested a review from a team as a code owner January 23, 2026 13:02
@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
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The change is a pure code refactoring/simplification in the AssetDetails component. It removes unused imports (Networks, selectProviderConfig, selectIsAllNetworks, selectEvmNetworkConfigurationsByChainId) and replaces a complex getNetworkName() callback function with a direct use of networkConfigurationByChainId?.name, which was already being fetched via the selectNetworkConfigurationByChainId selector.

Key observations:

  1. No functional changes - the component still displays the network name, just using a simpler approach
  2. The selectNetworkConfigurationByChainId selector is already widely used across the codebase (confirmations, gas calculations, stake components) for the same purpose
  3. No E2E tests directly test the AssetDetails component (searched for AssetDetails, asset-details, tokenDetails patterns in e2e/ directory)
  4. The component has unit tests (AssetsDetails.test.tsx) that would catch any regressions
  5. This is a cleanup change that reduces code complexity without changing behavior

Since this is a low-risk refactoring change with no behavioral modifications and no direct E2E test coverage for this component, no E2E test tags are required.

View GitHub Actions results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@bergarces bergarces changed the title fix network name in token details fix: network name in token details Jan 23, 2026
@sonarqubecloud
Copy link
Copy Markdown

@bergarces bergarces added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit ebb48c4 Jan 23, 2026
81 of 90 checks passed
@bergarces bergarces deleted the fix-network-name-token-details branch January 23, 2026 13:49
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
@metamaskbot metamaskbot added the release-7.64.0 Issue or pull request that will be included in release 7.64.0 label Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.64.0 Issue or pull request that will be included in release 7.64.0 size-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Token Details page occasionally shows the wrong network

3 participants