-
-
Notifications
You must be signed in to change notification settings - Fork 224
chore: calc slippage percentage #5723
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
base: main
Are you sure you want to change the base?
Conversation
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.
LGTM!
a6e4522
to
ce2b22e
Compare
.toFixed(2), | ||
) | ||
: null, | ||
percentageInUsd: |
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.
Won't the percentages always be equal? We can just return 1 value in this case, and can we use a string and let the clients round/trim as needed?
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.
We can 👍 . I coped the logic to always return the same as what we had, but we can change it to just one amount.
Explanation
Calculate slippage percentage
References
Changelog
Checklist