Skip to content

fix(bridge): cp-7.67.0 display block explorer tx link for Popular networks in transaction details#26659

Merged
vinnyhoward merged 8 commits into
mainfrom
fix-26419-transaction-block-tx-link-missing
Feb 27, 2026
Merged

fix(bridge): cp-7.67.0 display block explorer tx link for Popular networks in transaction details#26659
vinnyhoward merged 8 commits into
mainfrom
fix-26419-transaction-block-tx-link-missing

Conversation

@vinnyhoward

@vinnyhoward vinnyhoward commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Description

getBlockExplorerForChain() in TransactionDetails only resolved block explorer URLs for hardcoded built-in networks (Mainnet, Linea, Sepolia) and user-added custom RPC networks. Popular networks (Arbitrum, Polygon, BNB Chain, etc.) are neither — they aren't stored in networkConfigurations — so the method fell through to NO_RPC_BLOCK_EXPLORER, hiding the "View on X" link entirely.

The fix adds a PopularList lookup as a fallback, matching the pattern already used correctly in useBlockExplorer.ts.

Changelog

CHANGELOG entry: Fixed a bug where transactions on popular networks (Arbitrum, Polygon, BNB Chain, etc.) were missing the block explorer link in transaction details

Related issues

Fixes: #26419

Manual testing steps

Feature: Block explorer link in transaction details

  Scenario: user views a transaction from a Popular network
    Given the user has transactions on Arbitrum, Polygon, or BNB Chain
    And the activity feed is filtered by "Popular networks"

    When user taps a confirmed transaction from one of those networks
    Then a "View on Arbiscan" / "View on Polygonscan" / "View on Bscscan" link appears
    And tapping it opens the correct block explorer tx URL in the webview

  Scenario: user views a transaction on Ethereum Mainnet
    Given the user has transactions on Ethereum Mainnet
    When user taps a confirmed transaction
    Then a "View on Etherscan" link still appears (regression check)

Screenshots/Recordings

~

Before

before.mov

After

after.mov

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
Low risk UI fix that only changes how the transaction details screen resolves a block explorer URL, with added test coverage to prevent regressions.

Overview
Fixes missing “View on …” links in TransactionDetails for popular networks that aren’t present in networkConfigurations by falling back to PopularList to resolve rpcPrefs.blockExplorerUrl.

Adds unit tests ensuring the correct explorer link text/URL is produced for Arbitrum, Polygon, and BNB Chain, alongside existing mainnet/custom-network coverage.

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

@vinnyhoward vinnyhoward requested a review from a team as a code owner February 26, 2026 20:58
@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.

@metamaskbot metamaskbot added the team-mobile-ux Mobile UX team label Feb 26, 2026
wachunei
wachunei previously approved these changes Feb 27, 2026
…com:MetaMask/metamask-mobile into fix-26419-transaction-block-tx-link-missing
@vinnyhoward vinnyhoward changed the title fix: display block explorer tx link for Popular networks in transaction details fix(bridge): cp-7.67.0 display block explorer tx link for Popular networks in transaction details Feb 27, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/UI/TransactionElement/TransactionDetails/index.js
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes modify the TransactionDetails component to add a fallback mechanism for finding block explorer URLs for popular networks (Arbitrum, Polygon, BNB Chain, etc.) when they're not in the user's network configurations. This is a targeted enhancement that:

  1. TransactionDetails/index.js: Adds a lookup in PopularList to find block explorer URLs when the network isn't in networkConfigurations. This ensures users can view transactions on block explorers for popular networks.

  2. TransactionDetails/index.test.tsx: Adds comprehensive unit tests for Arbitrum, Polygon, and BNB Chain block explorer URL resolution.

The change is isolated to the transaction details display functionality and doesn't affect:

  • Transaction processing or confirmations
  • Account management
  • Network switching or management
  • Any core wallet functionality

SmokeWalletPlatform is the appropriate tag because it covers "transaction history: displaying incoming/outgoing ETH transactions, token transfer details" which is exactly what this component handles. The incoming-transactions.spec.ts test file is tagged with SmokeWalletPlatform and tests transaction display functionality.

The risk is low because:

  • The change is additive (fallback logic) and doesn't modify existing behavior
  • Good unit test coverage is provided
  • The change only affects UI display of block explorer links, not core functionality

Performance Test Selection:
No performance tests needed. The change adds a simple array lookup (PopularList.find()) which is O(n) on a small list (~15 networks) and only executes when viewing transaction details. This has negligible performance impact and doesn't affect app startup, rendering performance, or any critical user flows.

View GitHub Actions results

@vinnyhoward vinnyhoward added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit e7a93ce Feb 27, 2026
90 checks passed
@vinnyhoward vinnyhoward deleted the fix-26419-transaction-block-tx-link-missing branch February 27, 2026 19:58
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 27, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Feb 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-S team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Activity - Transactions from Popular networks don't display blockexplorer tx link

3 participants