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): add reassign/opt out publisher rewards #1916

Merged
merged 5 commits into from
Sep 13, 2024
Merged

Conversation

keyvankhademi
Copy link
Contributor

No description provided.

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

apps/staking/src/api.ts Outdated Show resolved Hide resolved
client: PythStakingClient,
stakeAccount: PublicKey,
targetAccount: PublicKey,
publisherKey: PublicKey,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like this should be derived in the SDK -- it's not valid to call setPublisherStakeAccount if the stakeAccount isn't the one assigned to the publisherKey so the stake account should be all we need right? Or in other words the stake account implies a specific publisher key, so it doesn't really make sense to pass both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I did that was to avoid fetching this data. I can fetch this data from the sdk by making an rpc call but I wanted to avoid increasing the number of rpc call. Do you still think it's better to do it this way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, I'm not sure if I really have a strong opinion, let's leave it as is and revisit later.

@keyvankhademi keyvankhademi merged commit b3fe3d4 into main Sep 13, 2024
6 checks passed
@keyvankhademi keyvankhademi deleted the sdk5 branch September 13, 2024 18:17
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