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

[GSW-371] fix: Manage slippage on local storage #207

Merged
merged 4 commits into from
Oct 12, 2023

Conversation

jinoosss
Copy link
Member

@jinoosss jinoosss commented Oct 6, 2023

No description provided.

@vercel
Copy link

vercel bot commented Oct 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gnoswap-interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2023 2:22am


const changeSlippage = useCallback(
(slippage: number) => {
let changedSlippage = slippage;
Copy link
Contributor

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);
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

@harryoh harryoh left a comment

Choose a reason for hiding this comment

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

👍

@jinoosss jinoosss merged commit feb8dfd into develop Oct 12, 2023
@jinoosss jinoosss deleted the GSW-371-manage-slippage-on-local-storage branch October 12, 2023 02:25
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