Skip to content

Conversation

@keyvankhademi
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Sep 26, 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 26, 2024 5:38pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 5:38pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
proposals ⬜️ Ignored (Inspect) Visit Preview Sep 26, 2024 5:38pm

return {
custodyAccount: custodyAccount.address.toBase58(),
actualAmount: Number(custodyAccount.amount),
actualAmount: Number(custodyAccount.amount) / FRACTION_PRECISION,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You might want to use this utility instead, which will avoid precision issues from division by actually just formatting the string rather than dividing by the precision: https://github.com/pyth-network/pyth-crosschain/blob/main/apps/staking/src/tokens.ts#L3-L16

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice one, used it.

@keyvankhademi keyvankhademi merged commit b6b5946 into main Sep 26, 2024
5 of 6 checks passed
@keyvankhademi keyvankhademi deleted the api2 branch September 26, 2024 17:36
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