Skip to content

Conversation

@khanti42
Copy link
Contributor

@khanti42 khanti42 commented Nov 10, 2025

Description

This change removes Sei from the default preloaded networks so that it no longer appears as a default entry in the networks list.
Instead, it will now be displayed under Additional Networks, allowing users to manually add it if needed.

Additionally, this update introduces a fallback RPC for Sei (QUICKNODE_SEI_URL) in customNetworks.tsx, ensuring improved redundancy and reliability when Infura is unavailable.

Changelog

CHANGELOG entry: removed Sei from default networks and added QuickNode fallback RPC.

Manual testing steps

Feature: Sei network configuration updates

  Scenario: Verify Sei is not listed as a default network
    Given the app is freshly installed or reset
    When I open the list of default networks
    Then I should NOT see "Sei" listed in the main network list
    And I should see "Sei" listed under the "Additional Networks" section

  Scenario: Verify Sei can be manually added
    Given I open the "Add Network" flow
    When I search for "Sei"
    Then I should be able to add the "Sei" network manually

Screenshots/Recordings

Before

After

Screenshot 2025-11-10 at 21 19 16

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

Removes Sei from default networks and adds a QuickNode fallback RPC, including a migration to populate failoverUrls and associated test/snapshot updates.

  • Networks:
    • Remove sei-mainnet from default NetworkController state so it appears under Additional Networks (app/core/Engine/controllers/network-controller-init.ts).
    • Add QuickNode mapping for sei-mainnet and use it as failoverRpcUrls in PopularList (app/util/networks/customNetworks.tsx).
  • Migration:
    • Add migration107 to append failoverUrls to SEI RPC endpoints when missing, guarded by QUICKNODE_SEI_URL (app/store/migrations/107.ts, wired in app/store/migrations/index.ts).
    • Comprehensive tests for structure validation and behavior (app/store/migrations/107.test.ts).
  • Tests/Snapshots:
    • Update AddressSelector expectations/snapshot to exclude Sei from EVM list (app/components/Views/AddressSelector/*).
    • Extend QuickNode env support to include QUICKNODE_SEI_URL in utils tests (app/core/Engine/controllers/network-controller/utils.test.ts).
    • Update logs and initial background state fixtures to remove default SEI config (app/util/logs/__snapshots__/index.test.ts.snap, app/util/test/initial-background-state.json).

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

@github-actions
Copy link
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.

@khanti42 khanti42 added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed team-network-enablement labels Nov 10, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 10, 2025
@stanleyyconsensys stanleyyconsensys marked this pull request as ready for review November 11, 2025 08:19
@stanleyyconsensys stanleyyconsensys requested a review from a team as a code owner November 11, 2025 08:19
Copy link

@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.

Bug: Network Configuration Desync Creates Inconsistent State

The Sei network configuration (0x531) was removed from NetworkController.networkConfigurationsByChainId, but the corresponding entry "0x531": true remains in NetworkEnablementController.enabledNetworkMap.eip155. This creates an inconsistent test state where a network is marked as enabled but doesn't exist in the network configurations, potentially causing tests to fail or pass incorrectly.

app/util/test/initial-background-state.json#L120-L130

"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": [
{
"failoverUrls": [],
"networkClientId": "bsc-mainnet",
"type": "infura",
"url": "https://bsc-mainnet.infura.io/v3/{infuraProjectId}"
}
]
},

Fix in Cursor Fix in Web


Bug: Orphaned Preferences: Network Configuration Mismatch

The Sei network configuration (0x531) was removed from NetworkController.networkConfigurationsByChainId, but PreferencesController.showIncomingTransactions still contains "0x531": true. This creates an inconsistent test state where incoming transactions are enabled for a network that doesn't exist in the network configurations.

app/util/test/initial-background-state.json#L120-L130

"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": [
{
"failoverUrls": [],
"networkClientId": "bsc-mainnet",
"type": "infura",
"url": "https://bsc-mainnet.infura.io/v3/{infuraProjectId}"
}
]
},

Fix in Cursor Fix in Web


Copy link

@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.

Bug: Phantom Network: Enabled But Configuration Gone.

The Sei network (0x531) is removed from NetworkController.networkConfigurationsByChainId but remains enabled in NetworkEnablementController.enabledNetworkMap.eip155. This creates an inconsistent state where the enablement controller indicates Sei is enabled but no network configuration exists for it, potentially causing runtime errors when code tries to access the missing Sei configuration.

app/util/test/initial-background-state.json#L120-L130

"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": [
{
"failoverUrls": [],
"networkClientId": "bsc-mainnet",
"type": "infura",
"url": "https://bsc-mainnet.infura.io/v3/{infuraProjectId}"
}
]
},

Fix in Cursor Fix in Web


Copy link

@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.

Bug: Phantom Network Causes Runtime Errors

Sei network (0x531) is removed from NetworkController.networkConfigurationsByChainId but remains enabled (true) in NetworkEnablementController.enabledNetworkMap.eip155. This creates an inconsistency where the enablement controller references a network that doesn't exist in the network configurations for new users, potentially causing runtime errors when the app tries to access the enabled but non-existent network.

app/util/test/initial-background-state.json#L120-L130

"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": [
{
"failoverUrls": [],
"networkClientId": "bsc-mainnet",
"type": "infura",
"url": "https://bsc-mainnet.infura.io/v3/{infuraProjectId}"
}
]
},

Fix in Cursor Fix in Web


@stanleyyconsensys stanleyyconsensys force-pushed the fix/update-sei-rpc-default-network branch from ef5b057 to 0475a5e Compare November 13, 2025 06:12
salimtb
salimtb previously approved these changes Nov 13, 2025
@salimtb
Copy link
Contributor

salimtb commented Nov 13, 2025

pls fix the broken unit test

salimtb
salimtb previously approved these changes Nov 13, 2025
@khanti42 khanti42 removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. INVALID-PR-TEMPLATE PR's body doesn't match template labels Nov 13, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 13, 2025
@khanti42 khanti42 added team-network-enablement and removed INVALID-PR-TEMPLATE PR's body doesn't match template labels Nov 13, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 13, 2025
)
)
) {
return state;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should capture exceptions if the state is not structured as expected, and that means a bug on the user data structure.
If you can, please visit other migrations to see how this is handled or our migration guidelines


// Remove Sei from initial state so it appears in Additional Networks section
// Users can add it manually, and it will be available in FEATURED_RPCS
delete initialNetworkControllerState.networkConfigurationsByChainId[
Copy link
Contributor

Choose a reason for hiding this comment

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

Im not understanding the need od this delete, shouldnt this be handled by the migration?

@sonarqubecloud
Copy link

@khanti42 khanti42 added this pull request to the merge queue Nov 13, 2025
@khanti42 khanti42 removed this pull request from the merge queue due to a manual request Nov 13, 2025
@khanti42 khanti42 added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 8bb23bf Nov 13, 2025
88 checks passed
@khanti42 khanti42 deleted the fix/update-sei-rpc-default-network branch November 13, 2025 17:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
@metamaskbot metamaskbot added the release-7.60.0 Issue or pull request that will be included in release 7.60.0 label Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-7.60.0 Issue or pull request that will be included in release 7.60.0 size-L team-network-enablement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants