Skip to content

Commit

Permalink
fix: crash lp earning (#2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold authored Aug 3, 2023
1 parent 6c26663 commit 1dc3064
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/MyEarnings/ElasticPools/SinglePool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const SinglePool: React.FC<Props> = ({ poolEarning, chainId, positionEarnings, p
poolEarning.token1.id,
+poolEarning.token1.decimals,
poolEarning.token1.symbol,
poolEarning.token0.name,
poolEarning.token1.name,
)

return [currency0, currency1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ const PriceRangeChart: React.FC<Props> = ({ position, disabled }) => {
const token1 = unwrappedToken(position.pool.token1)

const [baseCurrency, setBaseCurrency] = useState(token0)
const quoteCurrency = baseCurrency === token0 ? token1 : token0

const isRateReversed = quoteCurrency === token0
const quoteCurrency = baseCurrency.equals(token0) ? token1 : token0
const isRateReversed = quoteCurrency.equals(token0)

const tickAtLimit = useIsTickAtLimit(position.pool.fee, position.tickLower, position.tickUpper)

Expand Down

0 comments on commit 1dc3064

Please sign in to comment.