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(staking): implement some feedback items #1918

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

cprussin
Copy link
Collaborator

  • Fix alignment of stake account indicator in header
  • Update language of opt-out modal
  • Round APY in publishers table to 2 digits
  • Show estimated APY even if amount exceeds wallet balance
  • Separate main account from other accounts in stake account menu
  • Store last selected stake account in local storage

- Fix alignment of stake account indicator in header
- Update language of opt-out modal
- Round APY in publishers table to 2 digits
- Show estimated APY even if amount exceeds wallet balance
- Separate main account from other accounts in stake account menu
- Store last selected stake account in local storage
Copy link

vercel bot commented Sep 13, 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 Sep 13, 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 Sep 13, 2024 8:41pm
staking-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 8:41pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Sep 13, 2024 8:41pm

import { useLogger } from "../../hooks/use-logger";
import { usePrimaryDomain } from "../../hooks/use-primary-domain";
import { AccountHistory } from "../AccountHistory";
import { Button } from "../Button";
import { ModalDialog } from "../ModalDialog";
import { TruncatedKey } from "../TruncatedKey";

const ONE_SECOND_IN_MS = 1000;
const ONE_MINUTE_IN_MS = 60 * ONE_SECOND_IN_MS;
const REFRESH_INTERVAL = 1 * ONE_MINUTE_IN_MS;
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 it's a bit clunky because this is duplicated in two places since the dashboard data needs to be loaded now in the wallet menu too so we can display which account is the main account. So we have to do the useData call on the dashboard data. But it won't trigger a separate network call because swr will re-use the global cache, and this will go away when I refactor the dashboard data into use-api eventually, so I don't think it's a big issue to leave the duplication for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh ignore my last comment then, i just saw this.

@@ -16,6 +16,10 @@ import { Error as ErrorPage } from "../Error";
import { Loading } from "../Loading";
import { NoWalletHome } from "../NoWalletHome";

const ONE_SECOND_IN_MS = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

we can have these in a global constants file to avoid repetition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I'll refactor them in eventually, but it will go away when I clean up use-api anyways

@cprussin cprussin merged commit 106b09b into pyth-network:main Sep 13, 2024
6 checks passed
@cprussin cprussin deleted the more-feedback branch September 13, 2024 20:54
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.

2 participants