Skip to content

Commit

Permalink
sort stake section
Browse files Browse the repository at this point in the history
  • Loading branch information
corlard3y committed Sep 12, 2024
1 parent 52aa82b commit 729a315
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/rewards/utils/stakeRewardUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 729a315

Please sign in to comment.