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

fix: better support decimal overflow #2075

Merged
merged 10 commits into from
Jul 23, 2021

Conversation

justindomingue
Copy link
Contributor

@justindomingue justindomingue commented Jul 16, 2021

ethersjs tryParseUnit returns '0' when parsed input has more decimal than currency.decimal. Especially problematic in the add liquidity flow where we snap the user input to the nearest tick, sometimes adding decimals.

@vercel
Copy link

vercel bot commented Jul 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/uniswap/uniswap-interface/HT84eGsgxxMNAJMwn2Kya6H8LhdD
✅ Preview: https://uniswap-interface-git-judo-fixdecimals-use-fractionals-uniswap.vercel.app

@moodysalem
Copy link
Contributor

can we link a bug that describes what this fixes?

@justindomingue justindomingue linked an issue Jul 19, 2021 that may be closed by this pull request
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.test.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.test.ts Show resolved Hide resolved
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
src/state/mint/v3/utils.ts Outdated Show resolved Hide resolved
@justindomingue justindomingue merged commit e07599e into main Jul 23, 2021
@justindomingue justindomingue deleted the judo/fix/decimals-use-fractionals branch July 23, 2021 18:11
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.

Add Liquidity - % increment buttons underflow error
2 participants