Skip to content

fix: migrate Sei explorer from Seitrace to Seiscan#29221

Merged
jeremytsng merged 3 commits into
mainfrom
fix/sei-explorer-seitrace-to-seiscan
May 6, 2026
Merged

fix: migrate Sei explorer from Seitrace to Seiscan#29221
jeremytsng merged 3 commits into
mainfrom
fix/sei-explorer-seitrace-to-seiscan

Conversation

@jeremytsng
Copy link
Copy Markdown
Contributor

@jeremytsng jeremytsng commented Apr 22, 2026

Description

Seitrace (https://seitrace.com), the current Sei Mainnet block
explorer, is being decommissioned. This PR swaps every hardcoded
reference to seiscan.io and adds migration 134 to rewrite existing
users' persisted NetworkController state on upgrade.

Hardcoded URL swaps:

  • app/util/networks/customNetworks.tsx — Sei Mainnet blockExplorerUrl
  • tests/resources/networks.e2e.js — e2e resource
  • tests/api-mocking/mock-responses/tx-sentinel-networks-map.ts — mock explorer

Migration 134 rewrites
engine.backgroundState.NetworkController.networkConfigurationsByChainId['0x531'].blockExplorerUrls
from seitrace.com to seiscan.io for existing installs. It only
touches entries still pointing at seitrace.com — a user who customized
their Sei block explorer (e.g. to seistream.app) is left alone. The
migration follows mobile's current pattern (sync arrow function with
in-place state mutation), and is registered in
app/store/migrations/index.ts. Cross-repo reference for this family
of block-explorer-URL migrations is
metamask-extension/app/scripts/migrations/197.ts.

The @metamask/controller-utils bump is deliberately deferred until
the sibling PR in MetaMask/core releases; this PR stands alone.

Changelog

CHANGELOG entry: Fixed Sei Mainnet: replaced deprecated Seitrace explorer with Seiscan (https://seiscan.io). Existing installs are migrated via migration 134.

Related issues

Fixes:

Companion PRs:

Manual testing steps

Feature: Sei Mainnet block explorer URL

  Scenario: fresh install uses Seiscan
    Given a fresh install of MetaMask Mobile
    When the user adds the Sei Mainnet network
    Then the network's block-explorer URL is "https://seiscan.io/"
    And tapping a Sei transaction's "View on block explorer" opens "https://seiscan.io/tx/<hash>"

  Scenario: existing user with Seitrace URL is migrated
    Given a build prior to this change with Sei Mainnet added
    And the stored "blockExplorerUrls" is ["https://seitrace.com"]
    When the user upgrades to this build
    Then migration 134 runs
    And the stored "blockExplorerUrls" for Sei Mainnet is ["https://seiscan.io"]

  Scenario: user-customized URL is preserved
    Given a build prior to this change with Sei Mainnet added
    And the user has customized "blockExplorerUrls" to ["https://seistream.app"]
    When the user upgrades to this build
    Then migration 134 is a no-op for this entry
    And the stored "blockExplorerUrls" for Sei Mainnet remains ["https://seistream.app"]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

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

Medium Risk
Adds a new persisted-state migration that mutates NetworkController network configs for Sei Mainnet; while narrowly scoped, migrations run on upgrade and can affect existing user state if bugs slip through.

Overview
Updates Sei Mainnet’s default block explorer from Seitrace to Seiscan across the in-app popular network config and test fixtures.

Adds migration 134 (registered in app/store/migrations/index.ts) to rewrite persisted Sei Mainnet blockExplorerUrls entries whose URL hostname is exactly seitrace.com to seiscan.io, while leaving missing/invalid controller state and user-customized/lookalike URLs untouched; includes unit tests covering the rewrite and no-op cases.

Reviewed by Cursor Bugbot for commit 68e91bc. Bugbot is set up for automated code reviews on this repo. Configure here.

@jeremytsng jeremytsng requested review from a team as code owners April 22, 2026 21:35
@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.

@metamaskbotv2 metamaskbotv2 Bot added the team-networks Networks team label Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI PR Analysis

🚫 Merge safe: false | 🟠 Risk: high

Merge decision: AI analysis did not complete — manual review required before merging.

AI analysis did not complete. Manual review recommended.

View run

@github-actions github-actions Bot added risk:high AI analysis: high risk size-M labels Apr 22, 2026
Comment thread app/store/migrations/132.ts Fixed
@jeremytsng jeremytsng force-pushed the fix/sei-explorer-seitrace-to-seiscan branch 2 times, most recently from 90a80e0 to 3aa3d27 Compare April 30, 2026 22:22
weitingsun
weitingsun previously approved these changes Apr 30, 2026
@jeremytsng jeremytsng enabled auto-merge April 30, 2026 22:41
@jeremytsng jeremytsng force-pushed the fix/sei-explorer-seitrace-to-seiscan branch from 3aa3d27 to bd0df20 Compare May 4, 2026 19:02
@jeremytsng jeremytsng requested review from a team and weitingsun May 5, 2026 07:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The PR makes a narrow, targeted change: replacing the deprecated Seitrace block explorer URL (seitrace.com) with Seiscan (seiscan.io) for Sei Mainnet across four surfaces:

  1. Migration 134 (app/store/migrations/134.ts): Rewrites the block explorer URL in existing users' NetworkController state. This is a safe, targeted migration with no structural changes - it only touches blockExplorerUrls for chain ID 0x531 (Sei Mainnet) and only when the URL still points to seitrace.com.

  2. app/util/networks/customNetworks.tsx: Updates the PopularList entry for Sei Mainnet's blockExplorerUrl. This affects the "Add Popular Networks" flow in the Network Manager UI, which is covered by SmokeNetworkAbstractions.

  3. tests/api-mocking/mock-responses/tx-sentinel-networks-map.ts: Updates the Sei Mainnet explorer URL in the TX sentinel mock used as a default mock across all E2E tests. This is a data-only change with no structural impact.

  4. tests/resources/networks.e2e.js: Updates the Sei Testnet BlockExplorerUrl string. This file is imported by many test files (FixtureBuilder, network tests, ramps tests, etc.), but the Sei entry is rarely the focus of test assertions - it's used for fixture setup.

SmokeNetworkAbstractions is the most relevant tag because:

  • It tests adding popular networks (including Sei) via the Network Manager UI
  • It tests the network selector and network configuration flows
  • The customNetworks.tsx change directly affects what URL is shown/used when adding Sei Mainnet

No other tags are warranted because:

  • The migration only touches block explorer URLs, not transaction flows, confirmations, or account management
  • The mock data changes are URL-only updates with no structural impact
  • No confirmation flows, swap flows, or account flows are affected
  • The networks.e2e.js Sei entry change is a URL string update that doesn't affect test logic

Performance Test Selection:
No performance impact expected. The changes are limited to: (1) a state migration that runs once on upgrade and only rewrites a URL string, (2) a URL string update in the popular networks list, and (3) test mock data updates. None of these affect UI rendering performance, data loading, account/network list components, or app startup/initialization in a meaningful way.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@jeremytsng jeremytsng added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 2e4b3d7 May 6, 2026
108 of 129 checks passed
@jeremytsng jeremytsng deleted the fix/sei-explorer-seitrace-to-seiscan branch May 6, 2026 11:20
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 risk:high AI analysis: high risk size-M team-networks Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants