Skip to content

Commit

Permalink
fix: check for isDepositPeriod (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
DillonLin authored May 22, 2023
1 parent 50b2467 commit 1ce701c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ce701c

Please sign in to comment.