Skip to content

Commit

Permalink
fix: correct epoch gap condition in useRewardsHistory hook
Browse files Browse the repository at this point in the history
  • Loading branch information
mohandast52 committed Nov 15, 2024
1 parent f332282 commit aa1133b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/hooks/useRewardsHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export const useRewardsHistory = () => {
const previous = earnedCheckpoints[i - 1];
const epochGap = previous.epochStartTimeStamp - current.epochEndTimeStamp;

if (current.earned && epochGap <= Number(current.epochLength)) {
if (current.earned && Number(current.epochLength) > epochGap) {
return streakCount + 1;
}

Expand Down

0 comments on commit aa1133b

Please sign in to comment.