Skip to content

Commit

Permalink
fix: hide Prime rewards of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Nov 2, 2023
1 parent e464193 commit 08336ca
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ const formatToPrimePendingRewardGroup = ({
return acc;
}

const rewardAmountWei = new BigNumber(primePendingReward.amount.toString());

// Skip if pending reward amount is 0
if (rewardAmountWei.isLessThanOrEqualTo(0)) {
return acc;
}

// Add vToken address to list of vTokens to collect rewards from
vTokenAddressesWithPendingReward.push(primePendingReward.vToken);

const rewardAmountWei = new BigNumber(primePendingReward.amount.toString());
const rewardAmountTokens = convertWeiToTokens({
valueWei: new BigNumber(primePendingReward.amount.toString()),
token: rewardToken,
Expand Down

0 comments on commit 08336ca

Please sign in to comment.