## **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`](https://github.com/MetaMask/metamask-extension/blob/main/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:
- [`MetaMask/core#8545`](MetaMask/core#8545) —
default `BlockExplorerUrl[SeiMainnet]`
-
[`MetaMask/metafi-sdk#525`](MetaMask/metafi-sdk#525)
— shared SDK `SEI_EXPLORER`
-
[`MetaMask/metamask-extension#42064`](MetaMask/metamask-extension#42064)
— extension migration 207
## **Manual testing steps**
```gherkin
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**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
#### 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.
<!-- CURSOR_SUMMARY -->
---
> [!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.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
68e91bc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Description
Seitrace (
https://seitrace.com), the current Sei Mainnet blockexplorer, is being decommissioned. This PR swaps every hardcoded
reference to
seiscan.ioand adds migration 207 to rewrite existingusers' persisted
NetworkControllerstate on upgrade.Hardcoded URL swaps:
shared/constants/common.ts—SEI_DEFAULT_BLOCK_EXPLORER_URLshared/constants/network.ts— Sei MainnetblockExplorerUrlsapp/scripts/fixtures/with-networks.js— fixtureblockExplorerUrltest/e2e/fixtures/fixture-builder-v2.ts— e2e fixtureMigration 207 rewrites
NetworkController.networkConfigurationsByChainId['0x531'].blockExplorerUrlsfrom
seitrace.comtoseiscan.iofor existing installs. It onlytouches entries that still point at
seitrace.com— if a user manuallycustomized their Sei block explorer (e.g. to
seistream.app), theirsetting is preserved. Registered in
app/scripts/migrations/index.jsand follows the post-186 split-state pattern exemplified by migration
197.ts.Fixture
currentMigrationVersionbumped to 207 intest/e2e/fixtures/default-fixture.jsonandtest/e2e/fixtures/onboarding-fixture.json.errors-before-init-opt-in-ui-state.jsonuses"number"as the schemaplaceholder for
currentMigrationVersion, so no change is needed there.The
@metamask/controller-utilsbump is deliberately deferred untilthe sibling PR in
MetaMask/corereleases; 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 207.Related issues
Fixes:
Companion PRs:
MetaMask/core#8545— defaultBlockExplorerUrl[SeiMainnet]MetaMask/metafi-sdk#525— shared SDKSEI_EXPLORERMetaMask/metamask-mobile— mobile migration 132Manual testing steps
https://seiscan.io/tx/<hash>(notseitrace.com).blockExplorerUrls: ['https://seitrace.com']in state, upgrade to this build. Confirm migration 207 runs and the explorer link has updated.blockExplorerUrlsto a custom value like['https://seistream.app']before upgrading, then upgrade. Confirm the custom value is preserved (migration should be a no-op for non-Seitrace URLs).Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new state migration that rewrites persisted
NetworkControllerdata for Sei mainnet; while narrowly scoped, migrations can impact upgrade behavior and user network settings if edge cases are missed.Overview
Updates Sei Mainnet’s default block explorer URL from
https://seitrace.com/tohttps://seiscan.io/across shared constants and test/fixture network definitions.Introduces migration
207(registered in the migrator) to update existing installs by rewriting Sei (0x531)NetworkController.networkConfigurationsByChainId[].blockExplorerUrlsentries only when the URL hostname is exactlyseitrace.com, leaving custom/invalid/lookalike URLs unchanged; adds targeted unit tests and bumps e2e fixture migration/state versions to207.Reviewed by Cursor Bugbot for commit 9623a08. Bugbot is set up for automated code reviews on this repo. Configure here.