-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix: Cherry pick remove selectIdentities in favour of selectInternalAccounts #9724 #10244
Conversation
…#9724) 1. What is the reason for the change? In an effort to make MetaMask multi chain we are migrating from an address based accounts to account id based account. In #8759 previous PR we integrated the accounts controller which stores metadata like the account name, address and supported methods. This pr migrates all the use of `selectIdentities` to use the accounts controller as the source of truth for all accounts information (address, name etc). 2. What is the improvement/solution? - find all use of `selectIdentities` and replace it with `selectInternalAccounts` and/or `selectSelectedInternalAccountChecksummedAddress` - These selectors are already in use in `main` and are defined [here](https://github.com/MetaMask/metamask-mobile/blob/main/app/selectors/accountsController.ts#L11-L32). - tests for these utils can be found [here](https://github.com/MetaMask/metamask-mobile/blob/main/app/selectors/accountsController.test.ts#L86). - Note that ENS resolution in the send flow is not working but has been broken in production for a while. ENS resolution in the accounts list and dapp transactions are working as expected. Fixes: MetaMask/accounts-planning#410 - [QA builds](https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a4fca9c3-11d5-4654-80ce-4cdedd638fe6?tab=artifacts) - [ ] Verify that there is no use of `selectIdentities` in the app - [ ] Verify that no functions are expecting `identities` as params 1. Launch wallet 2. create a new account 4. once on the wallet view, add a new account 5. create a custom name for your account(s) 6. swipe away the app and re open 7. login 8. the selected account should be same one that was previously selected 9. all addresses should be in [checksum format](https://coincodex.com/article/2078/ethereum-address-checksum-explained/) 10. connect the portfolio dapp via the portfolio button on the home screen. 11. Click connect on the portfolio dapp 12. The first address in the address picker should be match the selected address on the wallet view and be in checksum format 1. Use an existing wallet that has multiple accounts created/imported 2. Change the names of your accounts so that they have custom names 3. "upgrade" your wallet to this branch 4. the selected account should be the same as it was on the previous branch 5. all of the account data should remain the same (names and balances) 1. Start a send transaction 2. Verify that the account names and addresses are consistent in the relevant screens of the flow 1. Connect a hardware wallet device 2. Go to the MetaMask test dapp and try to connect an account 3. Verify that the account names and addresses are consistent <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> https://github.com/MetaMask/metamask-mobile/assets/22918444/c5df59e1-05e6-43de-9efd-9a479aa342f7 dapps https://github.com/MetaMask/metamask-mobile/assets/22918444/2931b041-7e69-43ff-acb1-c4405e5b526b - Ledger account connected - Imported account with ens (orangefox.eth) - custom account name - derived account - Tested.... - send flow has the correct names ✅ - wallet list has the correct names, even after a force reload (and correct selected account) ✅ - dapp connection request has the correct names for all accounts including hardware and ENS account ✅ - dapp transactions have correct names for all account types https://github.com/MetaMask/metamask-mobile/assets/22918444/254aeb44-6301-463e-86b6-01a12d56d967 - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] 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. - [ ] 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.
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. |
|
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.
Changes in confirmation related files look good 👍
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.
Looks good to me: this cherry pick matches the original PR.
Important
make sure the related issues are closed before merging otherwise we can't tell if the testing was completely finished!
I changed this PR back to draft to make sure it's not merged in this release as we decided to include it in the next one. |
No release label on PR. Adding release label release-7.26.1 on PR, as PR was cherry-picked in branch 7.26.1. |
Description
selectIdentities
in favour ofselectInternalAccounts
#9724 into the release.Why?
Testing
E2E