-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Deepbook Locked Balance SDK #19557
Deepbook Locked Balance SDK #19557
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
}); | ||
|
||
const baseLocked = Number(bcs.U64.parse(new Uint8Array(res.results![0].returnValues![0][0]))); | ||
const quoteLocked = Number(bcs.U64.parse(new Uint8Array(res.results![0].returnValues![1][0]))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all unsafe number conversions fwiw, should be using bigint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will address in an improvement PR outside this one, for now rounding to 9 decimals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll actually have the precision issue before you do the division because JS can only represent numbers up to 2^53 - 1, but fine to punt.
Description
Locked balance function for sdk
Test plan
Testnet
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.