interface icon indicating copy to clipboard operation
interface copied to clipboard

fix: Full range button for both tokens

Open KevinNeewen opened this issue 3 years ago • 3 comments

Description This PR is to fix the issue 3843

What was causing the bug? When the user clicks on the Full Range button, the action setFullRange is dispatched, setting both leftRangeTypedValue and rightRangeTypedValue to true. That causes the useEffect below to execute and since there are always query params of minPrice and maxPrice on first load of the AddLiquidity page image The typeLeftRangeInput and typeRightRangeInput actions will dispatched, therefore setting the min/max price with what's in the query params.

KevinNeewen avatar Jul 23 '22 09:07 KevinNeewen

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

Name Status Preview Updated
interface ✅ Ready (Inspect) Visit Preview Jul 23, 2022 at 9:05AM (UTC)

vercel[bot] avatar Jul 23 '22 09:07 vercel[bot]

thanks for this PR @KevinNeewen! would you be willing to write a test for this behavior?

cmcewen avatar Aug 09 '22 14:08 cmcewen

thanks for this PR @KevinNeewen! would you be willing to write a test for this behavior?

Sure no problem. I'll make a following commit shortly to cover the scenario via jest!

KevinNeewen avatar Aug 19 '22 07:08 KevinNeewen

closing for now, but feel free to re-open if a test is added 👍

vm avatar Oct 19 '22 20:10 vm