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 unstake screen for mobile staking #11607

Merged
merged 20 commits into from
Oct 8, 2024

Conversation

amitabh94
Copy link
Contributor

@amitabh94 amitabh94 commented Oct 3, 2024

Description

This PR covers the following:

  • Adds new unstake screen
  • Uses the existing components with the same Max, %age, error states and currency conversion toggle
  • Adds unstaking information banner
  • Adds a new hook file for input screens

Related issues

Closes STAKE- 783

Manual testing steps

  1. Add export MM_POOLED_STAKING_UI_ENABLED=true to your .js.env file.
  2. Go to the ETH Token details Page
  3. Click on the Unstake Button
  4. You should be navigated to unstake screen.

Screenshots/Recordings

Before

Unstake_Screen_Before.mp4

After

Unstake_Screen_After.mp4

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.

Copy link
Contributor

github-actions bot commented Oct 3, 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.

@amitabh94 amitabh94 added team-stake Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 3, 2024
@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 3, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 3, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Oct 3, 2024
@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 92b1854
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6aed72d1-bade-4c3a-90d2-1d394d1b4c65

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

@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: a3cb2d7
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3987be84-7939-41bd-ab87-8360d78c4e48

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

@amitabh94 amitabh94 force-pushed the STAKE-783-fe-unstake-flow-build-unstake-screen branch from a3cb2d7 to 48df91c Compare October 3, 2024 22:35
It adds the estimatedAnnualRewards state and the calculateEstimatedAnnualRewards function to calculate and display the estimated annual rewards based on the staking amount and the annual reward rate.
@amitabh94 amitabh94 changed the title feat: add unstake screen feat: add unstake screen for mobile staking Oct 3, 2024
@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8792a06
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/39a66f66-7ae2-4c83-8291-c5eb9c60c3ca

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

@amitabh94 amitabh94 marked this pull request as ready for review October 3, 2024 22:49
@amitabh94 amitabh94 requested review from a team as code owners October 3, 2024 22:49
@Matt561 Matt561 self-requested a review October 4, 2024 13:26
Copy link
Contributor

@Matt561 Matt561 left a comment

Choose a reason for hiding this comment

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

Left some suggestions but otherwise LGTM! 💯

app/components/UI/Navbar/index.js Show resolved Hide resolved
app/components/UI/Stake/components/InputDisplay.tsx Outdated Show resolved Hide resolved
app/components/UI/Stake/components/InputDisplay.tsx Outdated Show resolved Hide resolved
app/components/UI/Stake/hooks/useStakingInput.ts Outdated Show resolved Hide resolved
app/components/UI/Stake/hooks/useStakingInput.ts Outdated Show resolved Hide resolved
app/components/UI/Stake/hooks/useStakingInput.ts Outdated Show resolved Hide resolved
@amitabh94 amitabh94 requested a review from a team as a code owner October 4, 2024 19:07
@amitabh94 amitabh94 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8809bfb
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/015e682b-0799-43d5-8a5c-cdc271cfa1f1

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
Contributor

@EtherWizard33 EtherWizard33 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Oct 8, 2024

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@amitabh94 amitabh94 added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 740c627 Oct 8, 2024
37 checks passed
@amitabh94 amitabh94 deleted the STAKE-783-fe-unstake-flow-build-unstake-screen branch October 8, 2024 19:23
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants