From 1ce701c69e37d07225f7fc293281a0726d8cea28 Mon Sep 17 00:00:00 2001 From: Dillon Lin <30581721+DillonLin@users.noreply.github.com> Date: Mon, 22 May 2023 13:19:15 +1000 Subject: [PATCH] fix: check for isDepositPeriod (#400) --- .../RewardsVaultsSection/RewardsVaultsMarketCard.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/containers/earn_index/RewardsVaultsSection/RewardsVaultsMarketCard.tsx b/app/src/containers/earn_index/RewardsVaultsSection/RewardsVaultsMarketCard.tsx index 3c9964c1..a55f563c 100644 --- a/app/src/containers/earn_index/RewardsVaultsSection/RewardsVaultsMarketCard.tsx +++ b/app/src/containers/earn_index/RewardsVaultsSection/RewardsVaultsMarketCard.tsx @@ -45,7 +45,11 @@ const RewardsVaultsMarketCard = ({ vault }: Props) => { const claimableVaultRewards = accountRewardEpoch?.totalClaimableVaultRewards(market.address) ?? [] const vaultRewards = sumRewardTokenAmounts([...pendingVaultRewards, ...claimableVaultRewards]) - return (vaultRewards.length ? vaultRewards : globalRewardEpoch.vaultRewardTokens.map(t => ({ ...t, amount: 0 })))[0] + return ( + vaultRewards.length && !globalRewardEpoch.isDepositPeriod + ? vaultRewards + : globalRewardEpoch.vaultRewardTokens.map(t => ({ ...t, amount: 0 })) + )[0] }, [accountRewardEpoch, firstRewardToken, globalRewardEpoch, market.address]) const liquidityTokenBalanceValue = vault.liquidityTokenBalanceValue