Skip to content

Commit 2132dd1

Browse files
committed
try to revert
1 parent 0b05b8e commit 2132dd1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pkg/service/rewardsDataService/rewards.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,7 @@ func (rds *RewardsDataService) GetRewardsForDistributionRoot(ctx context.Context
6363
return nil, fmt.Errorf("no distribution root found for root index '%d'", rootIndex)
6464
}
6565

66-
// Check if rewards calculation has been completed for this snapshot date
67-
snapshotDate := root.GetSnapshotDate()
68-
generatedSnapshot, err := rds.findRewardsGenerationForSnapshotDate(snapshotDate)
69-
if err != nil {
70-
return nil, fmt.Errorf("failed to check rewards generation status for snapshot date '%s': %w", snapshotDate, err)
71-
}
72-
if generatedSnapshot == nil {
73-
return nil, fmt.Errorf("rewards calculation has not been completed for distribution root %d (snapshot date: %s). Please wait for the calculation to finish", rootIndex, snapshotDate)
74-
}
75-
76-
return rds.rewardsCalculator.FetchRewardsForSnapshot(snapshotDate, nil, nil, nil)
66+
return rds.rewardsCalculator.FetchRewardsForSnapshot(root.GetSnapshotDate(), nil, nil, pagination)
7767
}
7868

7969
type TotalClaimedReward struct {

0 commit comments

Comments
 (0)