interface icon indicating copy to clipboard operation
interface copied to clipboard

Adjust price for decimals when comparing to 1

Open quentinadam opened this issue 2 years ago • 0 comments

In the position list component, when checking if the price should be inverted for display purposes, the check is done on the (unadjusted) price which can lead to confusion/inconsistencies.

For example, a pool with a token0 with 2 decimals and a token1 with 6 decimals will be displayed differently than a pool with a token0 with 6 decimals and a token1 with 6 decimals, even though they have the same adjusted price below 1 (the first pool will fail the check and return an (unadjusted) price above 1).

quentinadam avatar Dec 20 '23 13:12 quentinadam