From 09237971c11077ab8921ae29f42dca934e91f5ac Mon Sep 17 00:00:00 2001 From: TheNewAutonomy Date: Thu, 7 Jul 2022 17:21:44 +0100 Subject: [PATCH] TVL now based on farm TVL and not pool TVL --- src/features/onsen/FarmListItem.tsx | 4 ++-- src/hooks/useFarmRewards.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/features/onsen/FarmListItem.tsx b/src/features/onsen/FarmListItem.tsx index e388df4447..e4253a3fa5 100644 --- a/src/features/onsen/FarmListItem.tsx +++ b/src/features/onsen/FarmListItem.tsx @@ -69,7 +69,7 @@ const FarmListItem: FC = ({ farm, onClick }) => { ? farm?.roiPerYear > 10000 ? '>10,000%' : formatPercent(farm?.roiPerYear * 100) - : 'Infinite'} + : '-'} {!!farm?.feeApyPerYear && ( = ({ farm, onClick }) => { ? farm?.rewardAprPerYear > 10000 ? '>10,000%' : formatPercent(farm?.rewardAprPerYear * 100) - : 'Infinite'} + : '-'}
Fee APR: {farm?.feeApyPerYear < 10000 ? formatPercent(farm?.feeApyPerYear * 100) : '>10,000%'} diff --git a/src/hooks/useFarmRewards.ts b/src/hooks/useFarmRewards.ts index fd1730b01c..978025f3f3 100644 --- a/src/hooks/useFarmRewards.ts +++ b/src/hooks/useFarmRewards.ts @@ -148,7 +148,8 @@ export default function useFarmRewards({ chainId = ChainId.CELO }) { // const balance = swapPair ? Number(pool.balance / 1e18) : pool.balance / 10 ** kashiPair.token0.decimals const balance = swapSymmPair ? Number(pool.balance / 1e18) : pool.balance / 10 - const tvl = swapSymmPair.totalLiquidity + // const tvl = swapSymmPair.totalLiquidity + const tvl = (swapSymmPair.totalLiquidity / swapSymmPair.totalShares) * pool.slpBalance * 0.000000000000000001 // const feeApyPerYear = // swapPair && swapPair1d