-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat: Integrate enabled network map (functionality) #33478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gambinish
wants to merge
17
commits into
main
Choose a base branch
from
feat/integrate-enabledNetworkMap
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+161
−32
Conversation
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
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. |
✨ Files requiring CODEOWNER review ✨💎 @MetaMask/metamask-assets (4 files, +45 -22)
🖥️ @MetaMask/wallet-ux (2 files, +15 -1)
|
Builds ready [06212ea]
UI Startup Metrics (1241 ± 69 ms)
Benchmark value 1078 exceeds gate value 1070 for chrome browserify home mean load Benchmark value 1071 exceeds gate value 1061 for chrome browserify home mean domContentLoaded Benchmark value 1417 exceeds gate value 1365 for chrome browserify home p95 uiStartup Benchmark value 1211 exceeds gate value 1190 for chrome browserify home p95 load Benchmark value 1206 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded Benchmark value 24 exceeds gate value 18 for chrome browserify home p95 backgroundConnect Benchmark value 959 exceeds gate value 940 for chrome browserify home p95 loadScripts Benchmark value 2589 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 231 exceeds gate value 195 for firefox browserify home p95 domInteractive Benchmark value 1396 exceeds gate value 1380 for firefox webpack home mean load Benchmark value 1396 exceeds gate value 1380 for firefox webpack home mean domContentLoaded Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender Benchmark value 1376 exceeds gate value 1360 for firefox webpack home mean loadScripts Benchmark value 1947 exceeds gate value 1935 for firefox webpack home p95 uiStartup Benchmark value 1702 exceeds gate value 1660 for firefox webpack home p95 load Benchmark value 1701 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded Benchmark value 1684 exceeds gate value 1630 for firefox webpack home p95 loadScripts Sum of mean exceeds: 77ms | Sum of p95 exceeds: 444ms Sum of all benchmark exceeds: 521ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [548bb32]
UI Startup Metrics (1221 ± 91 ms)
Benchmark value 42 exceeds gate value 32 for chrome webpack home mean setupStore Benchmark value 2458 exceeds gate value 2454 for chrome webpack home p95 uiStartup Benchmark value 306 exceeds gate value 65 for chrome webpack home p95 setupStore Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender Sum of mean exceeds: 15ms | Sum of p95 exceeds: 247ms Sum of all benchmark exceeds: 262ms Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
7 tasks
Prithpal-Sooriya
approved these changes
Jun 5, 2025
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.
Description
This PR integrates the enabledNetworks state from the NetworkOrderController throughout the application, effectively replacing the legacy tokenNetworkFilter. This transition impacts:
Asset polling logic. We should poll on chains enabled with
enabledNetworkMap
rather thantokenNetworkFilter
dApp network switching. It should enable networks just as it previously updated
tokenNetworkFilter
.Network addition flows. When networks are added, they should be enabled, both manually through existing network picker and via dApp.
The goal is to centralize network enablement state in one place
enabledNetworkMap
and streamline how the app filters tokens and interacts with enabled networks. This change is foundational to supporting the new global network selector.Next step will be to replace the NetworkFilter entirely with a new component to handle network enablement in a multi-select way.
Designs for reference
Note that this PR affected a ton of e2e tests, since many tests are reliant on aggregated balance being loaded, along with certain networks to be enabled to match the currently selected global network for certain assets to show up/filter as expected. I've added this tests separately here: #33407
☝️ I'm open to breaking this up further to differentiate between unit test and e2e test updates. I'm also happy to discuss ways to make this follow up PR more minimal.
Related issues
Fixes:
Manual testing steps
3 While REMOVE_GNS=''
Screenshots/Recordings
With
REMOVE_GNS='true
feature flag on:Network Filter on MM:
https://github.com/user-attachments/assets/ce331108-c588-44bc-9677-8c50128513f1
dApp network switch:
https://github.com/user-attachments/assets/b617b527-029a-4b2f-992f-611ebe11429f
With
REMOVE_GNS=''
Screen.Recording.2025-06-04.at.12.05.42.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist