From c128302206299d67a50886c51a8c331848594a2e Mon Sep 17 00:00:00 2001 From: eli-d <64763513+eli-d@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:04:41 +0930 Subject: [PATCH] don't double add liquidity in liquidity calc --- web/src/components/SwapPro/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/SwapPro/index.tsx b/web/src/components/SwapPro/index.tsx index 23c6d1f4..572705df 100644 --- a/web/src/components/SwapPro/index.tsx +++ b/web/src/components/SwapPro/index.tsx @@ -66,7 +66,7 @@ export const SwapPro = ({ }, token1: { valueUsd: token1Value - } } + } } = {fusdc: {valueUsd: "0"}, token1: {valueUsd: "0"}} ] = poolSwapPro?.volumeOverTime.daily || [] return usdFormat(parseFloat(fusdcValue) + parseFloat(token1Value)) }, [poolSwapPro]) @@ -74,7 +74,7 @@ export const SwapPro = ({ const poolBalance = useMemo(() => ( usdFormat(poolSwapPro ? poolSwapPro.liquidity.reduce((total, { liquidity }) => - total + parseFloat(liquidity) + parseFloat(liquidity), + total + parseFloat(liquidity), 0) : 0 )), [poolSwapPro])