What changed (plus any additional context for devs)
Refactors the swap number pad logic to work without the old string vs. number checks, which are no longer reliable
This was causing a bug where if for example you dragged the slider, waited for the quote to fetch, and then typed into the output field, the amount in the input would switch to the unformatted, much longer number (the underlying input value)
Increases the gas buffer from +/- 0.25x to +/- 0.5x — was changing a bit too often
Improves the Max button and formattedInputAmount checks that determine whether max amount is being swapped, to explicitly check if the underlying input value is exactly the max swappable amount
Fixes bugs causing the input amount to sometimes exceed the max available balance when swapping max
Improves slider/max button logic in the case where the current input value exceeds your max swappable balance
You can now drag the slider to/beyond 100% to bring it down to your max swappable balance, and tapping the Max button does the same
Adds roundingMode: 'none' to valueBasedDecimalFormatter
Removes the -1precisionAdjustment in formattedInputAmount when swapping max
What changed (plus any additional context for devs)
+/- 0.25x
to+/- 0.5x
— was changing a bit too oftenformattedInputAmount
checks that determine whether max amount is being swapped, to explicitly check if the underlying input value is exactly the max swappable amountroundingMode: 'none'
tovalueBasedDecimalFormatter
-1
precisionAdjustment
informattedInputAmount
when swapping maxScreen recordings / screenshots
What to test