MetaMask / MetaMask/metamask-extension

[Networks] 'View on explorer' for ETH Mainnet token opens newly added network's explorer instead of Etherscan

Open
#46,372 0 comments 0 reactions 1 assignee Claimed by @ameliejyc View on GitHub
browser-chrome INVALID-ISSUE-TEMPLATE Sev2-normal team-core-extension-ux team-networks type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

## Description
After adding a new custom network, clicking 'View on explorer' for an ETH Mainnet token incorrectly opens the block explorer of the newly added network instead of Etherscan. The explorer URL resolution appears to be picking up the last added network's explorer rather than the correct network-specific explorer for the token.

## Steps to Reproduce
1. Add any new custom network to MetaMask
2. Switch to or remain on Ethereum Mainnet
3. Click on any ETH Mainnet token
4. Click the 3-dot menu → 'View on explorer'
5. Observe which explorer opens

## Expected Result
Etherscan (https://etherscan.io) opens for the ETH Mainnet token.

## Actual Result
The block explorer of the newly added custom network opens instead of Etherscan.

### Detection stage
Production

### Version
13.48.0

### Build type
Production

### Browser
Chrome

### Operating system
MacOS

### Hardware wallet
None

## Additional context
The issue appears to be a state management bug where the explorer URL resolution for the 'View on explorer' action is incorrectly referencing the most recently added network's explorer rather than the explorer associated with the token's network (Ethereum Mainnet). Reproducible with any newly added custom network.

## Severity
To be added after bug submission by internal support / PM.

## Media

https://github.com/user-attachments/assets/2bdc4a78-e34d-4b97-8099-c020db58c5f1

---
*Filed via Claude bug reporter*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.