feat: use defaultInfuraNetworks as default networks list#8767
Merged
Conversation
defaultInfuraNetwork as default networks listdefaultInfuraNetworks as default networks list
mikesposito
commented
May 11, 2026
| InfuraNetworkType['bsc-mainnet'], | ||
| InfuraNetworkType['optimism-mainnet'], | ||
| InfuraNetworkType['polygon-mainnet'], | ||
| InfuraNetworkType['monad-mainnet'], |
Member
Author
There was a problem hiding this comment.
I’m leaving Monad here intentionally as requested by the Money team
cc @Matt561
mcmire
reviewed
May 11, 2026
Comment on lines
+32
to
+45
| export const defaultInfuraNetworks: InfuraNetworkType[] = [ | ||
| InfuraNetworkType.mainnet, | ||
| InfuraNetworkType.goerli, | ||
| InfuraNetworkType.sepolia, | ||
| InfuraNetworkType['linea-goerli'], | ||
| InfuraNetworkType['linea-sepolia'], | ||
| InfuraNetworkType['linea-mainnet'], | ||
| InfuraNetworkType['base-mainnet'], | ||
| InfuraNetworkType['arbitrum-mainnet'], | ||
| InfuraNetworkType['bsc-mainnet'], | ||
| InfuraNetworkType['optimism-mainnet'], | ||
| InfuraNetworkType['polygon-mainnet'], | ||
| InfuraNetworkType['monad-mainnet'], | ||
| ]; |
Contributor
There was a problem hiding this comment.
Nit: Should we use the standard name for constants?
Suggested change
| export const defaultInfuraNetworks: InfuraNetworkType[] = [ | |
| InfuraNetworkType.mainnet, | |
| InfuraNetworkType.goerli, | |
| InfuraNetworkType.sepolia, | |
| InfuraNetworkType['linea-goerli'], | |
| InfuraNetworkType['linea-sepolia'], | |
| InfuraNetworkType['linea-mainnet'], | |
| InfuraNetworkType['base-mainnet'], | |
| InfuraNetworkType['arbitrum-mainnet'], | |
| InfuraNetworkType['bsc-mainnet'], | |
| InfuraNetworkType['optimism-mainnet'], | |
| InfuraNetworkType['polygon-mainnet'], | |
| InfuraNetworkType['monad-mainnet'], | |
| ]; | |
| export const DEFAULT_INFURA_NETWORKS: InfuraNetworkType[] = [ | |
| InfuraNetworkType.mainnet, | |
| InfuraNetworkType.goerli, | |
| InfuraNetworkType.sepolia, | |
| InfuraNetworkType['linea-goerli'], | |
| InfuraNetworkType['linea-sepolia'], | |
| InfuraNetworkType['linea-mainnet'], | |
| InfuraNetworkType['base-mainnet'], | |
| InfuraNetworkType['arbitrum-mainnet'], | |
| InfuraNetworkType['bsc-mainnet'], | |
| InfuraNetworkType['optimism-mainnet'], | |
| InfuraNetworkType['polygon-mainnet'], | |
| InfuraNetworkType['monad-mainnet'], | |
| ]; |
Alternatively should we narrow the type?
Suggested change
| export const defaultInfuraNetworks: InfuraNetworkType[] = [ | |
| InfuraNetworkType.mainnet, | |
| InfuraNetworkType.goerli, | |
| InfuraNetworkType.sepolia, | |
| InfuraNetworkType['linea-goerli'], | |
| InfuraNetworkType['linea-sepolia'], | |
| InfuraNetworkType['linea-mainnet'], | |
| InfuraNetworkType['base-mainnet'], | |
| InfuraNetworkType['arbitrum-mainnet'], | |
| InfuraNetworkType['bsc-mainnet'], | |
| InfuraNetworkType['optimism-mainnet'], | |
| InfuraNetworkType['polygon-mainnet'], | |
| InfuraNetworkType['monad-mainnet'], | |
| ]; | |
| export const DEFAULT_INFURA_NETWORKS = [ | |
| InfuraNetworkType.mainnet, | |
| InfuraNetworkType.goerli, | |
| InfuraNetworkType.sepolia, | |
| InfuraNetworkType['linea-goerli'], | |
| InfuraNetworkType['linea-sepolia'], | |
| InfuraNetworkType['linea-mainnet'], | |
| InfuraNetworkType['base-mainnet'], | |
| InfuraNetworkType['arbitrum-mainnet'], | |
| InfuraNetworkType['bsc-mainnet'], | |
| InfuraNetworkType['optimism-mainnet'], | |
| InfuraNetworkType['polygon-mainnet'], | |
| InfuraNetworkType['monad-mainnet'], | |
| ] as const satisfies InfuraNetworkType[]; |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit dbadfd5. Configure here.
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Some new Infura network have been added to
InfuraNetworkType(#8680), butNetworkControlleruses the same list of networks to:This has been fine until now because additional networks that can be enabled by users were added as "custom" networks. However, with the addition of new Infura networks, we have some networks that can be enabled by users but are not included in the default list of networks. This causes validation to fail when users try to enable those networks (via the Additional Networks list).
References
Checklist
Note
Medium Risk
Changes the set of networks that are auto-included on initialization, which is a breaking behavioral change that can affect users’ ability to switch to previously-default networks without first adding configurations.
Overview
Introduces
DEFAULT_INFURA_NETWORKS(a curated subset ofInfuraNetworkType) in@metamask/controller-utilsand exports it for consumers.Updates
NetworkControllerto build its defaultnetworkConfigurationsByChainIdfromDEFAULT_INFURA_NETWORKSinstead ofObject.values(InfuraNetworkType), effectively removing Sei, MegaETH, Avalanche, and ZKSync from the default network set while keeping them available as Infura-supported networks.Adjusts controller-utils export snapshots and network-controller tests/changelogs to reflect the new default-network behavior (breaking).
Reviewed by Cursor Bugbot for commit 0f8fa8c. Bugbot is set up for automated code reviews on this repo. Configure here.