From 729a3159d18e49bfb9e186748939890abb5e7067 Mon Sep 17 00:00:00 2001 From: corlard3y Date: Thu, 12 Sep 2024 10:58:00 +0100 Subject: [PATCH] sort stake section --- src/modules/rewards/utils/stakeRewardUtilities.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/rewards/utils/stakeRewardUtilities.ts b/src/modules/rewards/utils/stakeRewardUtilities.ts index 6c9b47392f..ce73174242 100644 --- a/src/modules/rewards/utils/stakeRewardUtilities.ts +++ b/src/modules/rewards/utils/stakeRewardUtilities.ts @@ -50,7 +50,11 @@ export const getActivityData = ( // and also, doing a filter and sort of all the unis, and all push to get the latest activities in the useStakeRewardsResetTime hook export const filterAndSortActivities = (prefix: string, activities: any[], multiplier?: boolean) => { return activities - .filter((activity) => activity.index.startsWith(multiplier ? `multiplier-${prefix}` : `point-${prefix}`)) + .filter( + (activity) => + activity.index.startsWith(multiplier ? `multiplier-${prefix}` : `point-${prefix}`) && + activity?.status === 'ENABLED' + ) .sort(sortByIndexNumber); };