-
Notifications
You must be signed in to change notification settings - Fork 10
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
[GSW-371] fix: Manage slippage on local storage #207
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
const changeSlippage = useCallback( | ||
(slippage: number) => { | ||
let changedSlippage = slippage; |
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.
How about it?
const changedSlippage = Math.min(100, Math.max(0, parseInt(slippage)));
} else if (slippage > 100) { | ||
changedSlippage = 100; | ||
} | ||
changedSlippage = toDecimalNumber(changedSlippage, 2); |
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.
Does slippage
need to bignumber
?
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.
No, I wanted to round to the second decimal place.
But this seems to be wrong.
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.
👍
No description provided.