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

sdk: add getMaxSwapAmount #488

Merged
merged 16 commits into from
Jun 22, 2023
Merged

sdk: add getMaxSwapAmount #488

merged 16 commits into from
Jun 22, 2023

Conversation

crispheaney
Copy link
Member

No description provided.

sdk/src/user.ts Outdated
if (freeCollateralAfter.gt(error)) {
minSwap = swap;
swap = minSwap.add(maxSwap).div(TWO);
} else if (freeCollateralAfter.abs().gt(error)) {
Copy link
Member

Choose a reason for hiding this comment

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

handle -QUOTE_PREICISION

make explicit use of negative sign for readability

@crispheaney crispheaney merged commit 950b61c into master Jun 22, 2023
6 of 7 checks passed
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.

None yet

2 participants