Skip to content

feat(staking): add low-res implementation for new requirements #1844

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

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

cprussin
Copy link
Collaborator

This PR adds low-res / unstyled implementation for the following new feature requirements that we've discovered:

  • Must claim rewards before withdrawing
  • Must claim rewards before unstaking
  • Add swr to loadData
  • Calculate APY in the frontend
  • Show how APY will change due to staking tokens
  • Show historical APY in a spark chart
  • Add functionality to select a stake account if multiple exist for the given wallet
  • If wallet is a publisher, show self highlighted (& adjust apy calculation)
  • Claim within 1 year
  • Show next locked token unlock period & amount
  • Show account history

This PR adds low-res / unstyled implementation for the following new feature
requirements that we've discovered:

- Must claim rewards before withdrawing
- Must claim rewards before unstaking
- Add swr to loadData
- Calculate APY in the frontend
- Show how APY will change due to staking tokens
- Show historical APY in a spark chart
- Add functionality to select a stake account if multiple exist for the given wallet
- If wallet is a publisher, show self highlighted (& adjust apy calculation)
- Claim within 1 year
- Show next locked token unlock period & amount
- Show account history
Copy link

vercel bot commented Aug 25, 2024

@cprussin is attempting to deploy a commit to the pyth-web Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Aug 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 25, 2024 8:13pm
staking-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 25, 2024 8:13pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Aug 25, 2024 8:13pm

@@ -1,58 +1,37 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@keyvankhademi especially take a look at this file as the requirements for the API have changed significantly and there are many new parts to account for all the new requirements.

@cprussin
Copy link
Collaborator Author

Merging without review since this is pre-prod and some folks who need to review the UX can't access the preview build

@cprussin cprussin merged commit 795a84e into pyth-network:main Aug 26, 2024
6 checks passed
@cprussin cprussin deleted the staking-app-improvements branch August 26, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant