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

feat: add staked ETH to metamask mobile homepage and account list menu #12146

Conversation

nickewansmith
Copy link
Contributor

@nickewansmith nickewansmith commented Nov 1, 2024

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

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

Screenshot 2024-11-01 at 4 37 21 PM Screenshot 2024-11-01 at 4 37 27 PM Screenshot 2024-11-01 at 4 37 44 PM

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

github-actions bot commented Nov 1, 2024

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
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

github-actions bot commented Nov 1, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: a1ffc42
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c1e3adbf-bb1b-4a8d-9963-f72ccb8411a7

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

@nickewansmith nickewansmith force-pushed the STAKE-817-fe-show-staked-eth-position-in-homepage-along-with-other-tokens branch from 8718ffb to e3d4b1f Compare November 1, 2024 21:40
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: e3d4b1f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/285717b5-c35a-4d45-a8ab-36d913c750a4

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

@nickewansmith nickewansmith force-pushed the STAKE-817-fe-show-staked-eth-position-in-homepage-along-with-other-tokens branch from e3d4b1f to b1b16c7 Compare November 1, 2024 21:57
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: b1b16c7
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c2c1fb77-8d52-4a3a-a2bc-9779dae0a0e8

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

@nickewansmith nickewansmith marked this pull request as ready for review November 1, 2024 22:09
@nickewansmith nickewansmith requested review from a team as code owners November 1, 2024 22:09
@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 4, 2024
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 4, 2024
Copy link
Contributor

@amitabh94 amitabh94 left a comment

Choose a reason for hiding this comment

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

Some minor comments but otherwise LGTM!

amitabh94
amitabh94 previously approved these changes Nov 4, 2024
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 4, 2024

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith
@nickewansmith nickewansmith force-pushed the STAKE-817-fe-show-staked-eth-position-in-homepage-along-with-other-tokens branch from 37f91d9 to 16c6e6f Compare November 9, 2024 01:47
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: 16c6e6f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/1b1d19a6-0096-4e45-8118-93fa31e63de4

Note

  • This comment will auto-update when build completes
  • 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

Verified

This commit was signed with the committer’s verified signature.
nickewansmith Nicholas Smith
@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 9, 2024
Copy link
Contributor

github-actions bot commented Nov 9, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 46615fc
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2fa96487-8a6d-456a-b4d7-16da180c7f8a

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

Copy link

sonarcloud bot commented Nov 9, 2024

@nickewansmith nickewansmith added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 9, 2024
Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

LGTM

@nickewansmith nickewansmith added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit 3963644 Nov 12, 2024
55 checks passed
@nickewansmith nickewansmith deleted the STAKE-817-fe-show-staked-eth-position-in-homepage-along-with-other-tokens branch November 12, 2024 17:31
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2024
@gauthierpetetin gauthierpetetin added the release-7.36.0 Issue or pull request that will be included in release 7.36.0 label Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.36.0 Issue or pull request that will be included in release 7.36.0 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

7 participants