Skip to content
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

chore(cherry-pick) fix: ensure StakingBalance is shown or hidden appropriately per asset… #13011

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

nickewansmith
Copy link
Contributor

@nickewansmith nickewansmith commented Jan 15, 2025

…… (#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.

  1. 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

Screen.Recording.2025-01-15.at.8.19.49.AM.mov
Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2025-01-15.at.08.18.44.mp4
  • I’ve followed MetaMask Contributor Docs and MetaMask Mobile Coding
    Standards
    .

  • 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 format if applicable

  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

Description

Cherry pick stake 721

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/STAKE-921

Manual testing steps

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

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Sorry, something went wrong.

Copy link
Contributor

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.

@nickewansmith nickewansmith changed the title fix: ensure StakingBalance is shown or hidden appropriately per asset… chore(cherry-pick) fix: ensure StakingBalance is shown or hidden appropriately per asset… Jan 15, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 15, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
#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.
@nickewansmith nickewansmith force-pushed the fix-cherry-pick-7.38.0-stake-921 branch from caed7d7 to 4f448e0 Compare January 15, 2025 17:09
@nickewansmith nickewansmith marked this pull request as ready for review January 15, 2025 17:12
@nickewansmith nickewansmith requested review from a team as code owners January 15, 2025 17:12
@metamaskbot metamaskbot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Jan 15, 2025
@nickewansmith nickewansmith added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jan 15, 2025
Copy link
Contributor

github-actions bot commented Jan 15, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 4f448e0
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2c8247f6-273e-41c3-8df0-cdb97cb007df

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@sethkfman sethkfman merged commit f3dc6d9 into release/7.38.0 Jan 15, 2025
33 of 36 checks passed
@sethkfman sethkfman deleted the fix-cherry-pick-7.38.0-stake-921 branch January 15, 2025 19:22
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-stake
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants