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: enable earn button navigation on unsupported networks (#12988) #13012

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

amitabh94
Copy link
Contributor

@amitabh94 amitabh94 commented Jan 15, 2025

This PR fixes Earn CTA navigation behavior when clicked on unsupported
networks. Previously, the button was unresponsive or navigated to
Portfolio screen when clicked on networks that don't support staking.
Now, it properly switches to mainnet and navigates to the staking UI.

  1. Open the app and navigate to home page and select Portfolio View
  2. Change the Network to Linea
  3. Click on Earn button next to Ethereum in Portfolio View
  4. It should change the network to mainnet and then navigate to staking
    UI
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-15.at.08.40.50.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-15.at.08.43.34.mp4

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

Description

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

<!--
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.
-->
This PR fixes Earn CTA navigation behavior when clicked on unsupported
networks. Previously, the button was unresponsive or navigated to
Portfolio screen when clicked on networks that don't support staking.
Now, it properly switches to mainnet and navigates to the staking UI.

- Jira ticket:
[STAKE-916](https://consensyssoftware.atlassian.net/browse/STAKE-916)

1. Open the app and navigate to home page and select Portfolio View
2. Change the Network to Linea
3. Click on Earn button next to Ethereum in Portfolio View
4. It should change the network to mainnet and then navigate to staking
UI

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

https://github.com/user-attachments/assets/8421278f-43c1-48c3-9d4b-1c48d2dc9669

https://github.com/user-attachments/assets/a14f2b86-5701-4c91-b566-ddefa563f4ee

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

- [ ] 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.

[STAKE-916]:
https://consensyssoftware.atlassian.net/browse/STAKE-916?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@amitabh94 amitabh94 requested review from a team as code owners January 15, 2025 17:24
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.

@amitabh94 amitabh94 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: 159b04e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/05113df7-7505-4111-9473-5e9026bf4890

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

Copy link
Contributor

@nickewansmith nickewansmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sethkfman sethkfman merged commit c4180b9 into release/7.38.0 Jan 15, 2025
41 of 44 checks passed
@sethkfman sethkfman deleted the chore/cherry-pick-12988 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.

5 participants