Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure StakingBalance is shown or hidden appropriately per asset… (
#12987) 1. What is the reason for the change? There are 2 separate issues that are both related to the StakedBalance component. One is Asset Detail StakingBalance shows for ETH assets on unsupported chains with popular networks filter. The other is Asset Detail StakingBalance does not show for mainnet ETH asset when on unsupported chain with popular networks filter. 2. What is the improvement/solution? The user will not see staked ethereum info for assets that are not mainnet Ethereum asset when on mainnet The user will see staked ethereum info when on unsupported chain with popular networks filter and viewing the mainnet Ethereum asset detail. We show the details but hide any staking actions for the time being while we re-evaluate how to keep the actions and switch the network on the fly. Fixes: https://consensyssoftware.atlassian.net/browse/STAKE-921 **Asset Detail StakingBalance shows for ETH assets on unsupported chains with popular networks filter** - Switch to mainnet network - Switch to popular networks filter - Select the native asset of a popular network that is not mainnet, such as Base or Optimism - In the asset detail page you should not see staked ethereum info **Asset Detail StakingBalance does not show for mainnet ETH asset when on unsupported chain with popular networks filter** Switch to Base network Switch to popular networks filter Select the mainnet Ethereum asset In the asset detail page you should see staked ethereum info and earnings info but no action buttons or claim link banners <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> https://github.com/user-attachments/assets/83132195-8bd8-452f-a25f-37a9b1d276d9 https://github.com/user-attachments/assets/6e0bde2f-1dd2-4cd8-ad2c-e78cbe962ff1 - [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 - [ ] 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. - [ ] 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