-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add staked ETH to metamask mobile homepage and account list menu (
#12146) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** 1. What is the reason for the change? We want to be able to view the Staked Ethereum balance on the homepage and have the balance totals update to reflect this 2. What is the improvement/solution? This PR adds the ability for the metamask-mobile app to view the Staked Ethereum asset balance in the mobile homepage in the Token List while linking to the ETH Asset Detail view. It also adds Staked Ethereum to the homepage total balance and the Account List menu total balances as well. The functionality is gated behind the `MM_POOLED_STAKING_UI_ENABLED` flag. ## **Related issues** Closes: https://consensyssoftware.atlassian.net/browse/STAKE-817 ## **Manual testing steps** 1. First launch the mobile application with `MM_POOLED_STAKING_UI_ENABLED="true"` in `js.env` 2. The homepage should show the `Staked Ethereum` asset balance for selected account in the homepage even if the balance is 0 3. On mainnet, the percentage +/- of the asset should be listed and should be the same as ETH 4. On holesky, the percentage +/- of the asset should not be listed 5. On an unsupported network, the Staked Ethereum asset should not show at all 6. If you click the Staked Ethereum asset it should go to the ETH asset detail page as Staked ETH is not a real token 7. On the ETH asset detail page, the Staked Ethereum balance should be the same as the homepage, **there should be no discrepancy** 8. Staking flow should not be affected 9. Total balance on the homepage should include Staked Ethereum balance 10. Total balances per account on the Account List menu dropdown should also include Staked Ethereum balance 11. All balanced mentioned should update when there is a balance change, one can go through staking flow to test this 12. **There should be no discrepancies across amounts as they have been addressed** ## **Screenshots/Recordings** ### **Before** WIP ### **After** <img width="391" alt="Screenshot 2024-11-01 at 4 37 21 PM" src="https://github.com/user-attachments/assets/da9e351a-bdaf-48f6-927c-be7c42f416b7"> <img width="426" alt="Screenshot 2024-11-01 at 4 37 27 PM" src="https://github.com/user-attachments/assets/4fecbab6-036a-448b-99c6-6565516a3a39"> <img width="388" alt="Screenshot 2024-11-01 at 4 37 44 PM" src="https://github.com/user-attachments/assets/69076e53-a546-434d-b7cb-6f7fcb00beea"> ## **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** - [ ] 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.
- Loading branch information
1 parent
9ccffcf
commit 3963644
Showing
11 changed files
with
916 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.