Skip to content

Commit

Permalink
don't double add liquidity in liquidity calc
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-d committed Jun 24, 2024
1 parent e6bc90d commit c128302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/SwapPro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ export const SwapPro = ({
},
token1: {
valueUsd: token1Value
} }
} } = {fusdc: {valueUsd: "0"}, token1: {valueUsd: "0"}}
] = poolSwapPro?.volumeOverTime.daily || []
return usdFormat(parseFloat(fusdcValue) + parseFloat(token1Value))
}, [poolSwapPro])

const poolBalance = useMemo(() => (
usdFormat(poolSwapPro ?
poolSwapPro.liquidity.reduce((total, { liquidity }) =>
total + parseFloat(liquidity) + parseFloat(liquidity),
total + parseFloat(liquidity),
0) :
0
)), [poolSwapPro])
Expand Down

0 comments on commit c128302

Please sign in to comment.