Skip to content

chore: cherry-pick #13594 (feat: STAKE-934: integrate earn controller package into existing pooled staking hooks)#13612

Merged
MarioAslau merged 2 commits into
release/7.41.0from
cherry-pick-e3c59ba
Feb 19, 2025
Merged

chore: cherry-pick #13594 (feat: STAKE-934: integrate earn controller package into existing pooled staking hooks)#13612
MarioAslau merged 2 commits into
release/7.41.0from
cherry-pick-e3c59ba

Conversation

@Matt561

@Matt561 Matt561 commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

This PR cherry-picks #13594

Matt561 and others added 2 commits February 19, 2025 16:09
<!--
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.
-->

Fixed inconsistent APR value displayed throughout the application. Also
fixed the annual rate tooltip not displaying the historic APY graph.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

Fixes: [STAKE-946: [FE] Fix inconsistent pooled-staking vault
APR](https://consensyssoftware.atlassian.net/browse/STAKE-946)

The pooled-staking APR is displayed in the following place:

- CTA for users that have never staked before contains APR.
- Annual rate for those that have staked.
- APR is displayed as the "weekly average APR" in the historic APR graph
when clicking on the annual rate tooltip.

- APR is displayed above the quick amount buttons when user hasn't
entered a value yet.
- APR is displayed as the "weekly average APR" in the historic APR graph
when clicking on the tooltip.

- The reward rate/annual rate displays the APR.

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

<!-- [screenshots/recordings] -->

![image](https://github.com/user-attachments/assets/04d808dc-2948-4bf7-9999-7b1de26f8af5)

![image](https://github.com/user-attachments/assets/46a64153-de28-4a07-b60e-6ee4b6f53823)

<!-- [screenshots/recordings] -->

https://github.com/user-attachments/assets/3c834e82-36f8-406c-8c0a-4d527b0c0db0

- [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
- [ ] 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.
@metamaskbot metamaskbot added the team-identity-deprecated DEPRECATED: team no longer exists label Feb 19, 2025
@github-actions

Copy link
Copy Markdown
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.

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 19, 2025
@Matt561 Matt561 added rc-cherry-picked and removed INVALID-PR-TEMPLATE PR's body doesn't match template team-identity-deprecated DEPRECATED: team no longer exists labels Feb 19, 2025
@Matt561 Matt561 marked this pull request as ready for review February 19, 2025 21:30
@Matt561 Matt561 requested review from a team as code owners February 19, 2025 21:30
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (release/7.41.0@510f837). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...Stake/components/StakingBalance/StakingBalance.tsx 50.00% 0 Missing and 1 partial ⚠️
...ents/UI/Stake/components/StakingEarnings/index.tsx 50.00% 1 Missing ⚠️
.../components/UI/Stake/hooks/useVaultApyAverages.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/7.41.0   #13612   +/-   ##
=================================================
  Coverage                  ?   61.85%           
=================================================
  Files                     ?     1980           
  Lines                     ?    43948           
  Branches                  ?     5946           
=================================================
  Hits                      ?    27183           
  Misses                    ?    14961           
  Partials                  ?     1804           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud

Copy link
Copy Markdown

@nickewansmith nickewansmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and LGTM

@MarioAslau MarioAslau merged commit e54b55c into release/7.41.0 Feb 19, 2025
@MarioAslau MarioAslau deleted the cherry-pick-e3c59ba branch February 19, 2025 22:39
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants