-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
refactor: refactor network picker #30433
Conversation
ui/components/multichain/network-list-menu/__snapshots__/network-list-menu.test.js.snap
Outdated
Show resolved
Hide resolved
Builds ready [edf1786]
Page Load Metrics (2008 ± 96 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
…Mask/metamask-extension into gar/refactor-network-picker
Builds ready [27c0a3d]
Page Load Metrics (1716 ± 66 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Before I approve:
- UX bug: I believe, this is not a network picker bug but while creating Solana accounts from settings page, the modal appears behind the page which seems confusing.
Screen.Recording.2025-02-25.at.10.05.07.AM.mov
- Are we not adding the support to edit RPC URL for Solana network like other EVM networks?
Good catch @NidhiKJha!
Indeed this is not a bug introduced in this PR, I'll open a ticket for us to fix it
No, since the snap abstracts this away from the client and there is no snap API that allows the client to get/update this information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM (thanks for all the changes).
Here are some screenshots from my testing:
-
Enabling bitcoin support (needs to enable this in the
builds.yml
)
-
Logic works fine when selecting an account/network (the other part is switching automatically)
Warning
Small issue with the Bitcoin testnet support (which is OK for now, since we've disabled Bitcoin support temporarily)
Now, the only issue I have found so far, is with "Bitcoin testnet". We don't have this network yet (and the logic to associate accounts and their networks is a bit incorrect on the AccountsController
: https://github.com/MetaMask/core/blob/main/packages/accounts-controller/src/AccountsController.ts#L1017-L1019, I'm currently fixing this now).
Back to the problem, if we use an account that uses a scopes
that is not associated with one of our non-EVM network, the wallet will be kinda blocked with this screen:
We can fix this issue in another PR, cause I think part of the MultichainNetworkController
logic might have to be updated for this.
Builds ready [40cd6de]
Page Load Metrics (1753 ± 118 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solana setting is missing in experimental settings. By default it's being added in the network list.
https://github.com/user-attachments/assets/fd77cedc-061b-407c-bf87-1092c80f6748
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Related issues
Fixes: https://github.com/MetaMask/accounts-planning/issues/833
Fixes: https://github.com/MetaMask/accounts-planning/issues/811
Manual testing steps
Note: UX changes should only be present in Flask/Beta
Screenshots/Recordings
Before
Screen.Recording.2025-02-24.at.9.55.07.AM.mov
After
Screen.Recording.2025-02-24.at.10.01.45.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist