From b2860121e53885f97599606eec6dd02d57fcd283 Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Mon, 12 Feb 2024 13:32:45 -0800 Subject: [PATCH] fix: dont show unrelated rewards in gov rewards table --- .../generate-epoch-total-rewards-list.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/governance/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts b/apps/governance/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts index 4c20dab59..440ee97ff 100644 --- a/apps/governance/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts +++ b/apps/governance/src/routes/rewards/epoch-total-rewards/generate-epoch-total-rewards-list.ts @@ -83,10 +83,12 @@ export const generateEpochTotalRewardsList = ({ (Number(rewardItem?.amount) || 0) + Number(reward.amount) ).toString(); - rewards?.set(reward.rewardType, { - rewardType: reward.rewardType, - amount, - }); + if (Object.keys(RowAccountTypes).includes(reward.rewardType)) { + rewards?.set(reward.rewardType, { + rewardType: reward.rewardType, + amount, + }); + } epoch.assetRewards.set(reward.assetId, { assetId: reward.assetId,