-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: change contacts logic in order to support global network selector removal #16585
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
feat: change contacts logic in order to support global network selector removal #16585
Conversation
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. |
|
…d flow, verify adding a contact during the send flow works correctly
…alNetworkSelectorEnabled is true
|
…b.com:MetaMask/metamask-mobile into feat/contacts-without-global-network-selector
|
A custom Bitrise pipeline where |
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.
I have done a manual pass confirming the functionality as described in the PR description
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 looks solid. Approving now. I'll do some manual testing this afternoon. I'll ping you if I find anything
…or removal (#16585) ## **Description** This PR makes it so the contacts feature supports the future removal of the global network selector. Namely, with this PR: - Every EVM contact is displayed in the contacts page, with an added network badge - Every EVM contact is displayed in the send flow - A network selector can be used when adding or editing a contact - Network badges are also shown in the send flow address book By itself, this PR introduces no user facing changes, because new logic is behind the `MM_REMOVE_GLOBAL_NETWORK_SELECTOR` feature flag. This flag is `false` by default. In order to test this PR changes, you'd need to temporarily modify `app/util/networks/index.js` so that `isRemoveGlobalNetworkSelectorEnabled` returns true. ## **Related issues** Fixes: - MetaMask/MetaMask-planning#4112 - MetaMask/MetaMask-planning#4177 ## **Manual testing steps** 1. Enable the `MM_REMOVE_GLOBAL_NETWORK_SELECTOR` feature flag (see description above) 2. Go to the contacts page 3. Verify that every contact has a network badge 4. Add or edit a contact 5. Verify that you can select the network 6. Go to the send flow 7. Verify that all EVM contacts are displayed 8. Verify that those contacts have a network badge ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/2e6c866e-a6ca-4f77-8d93-c5d1c2b795fe ## **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 - [x] 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. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
Description
This PR makes it so the contacts feature supports the future removal of the global network selector.
Namely, with this PR:
By itself, this PR introduces no user facing changes, because new logic is behind the
MM_REMOVE_GLOBAL_NETWORK_SELECTOR
feature flag. This flag isfalse
by default.In order to test this PR changes, you'd need to temporarily modify
app/util/networks/index.js
so thatisRemoveGlobalNetworkSelectorEnabled
returns true.Related issues
Fixes:
Manual testing steps
MM_REMOVE_GLOBAL_NETWORK_SELECTOR
feature flag (see description above)Screenshots/Recordings
Before
After
contacts_2.mov
Pre-merge author checklist
Pre-merge reviewer checklist