Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disable realization status update from stream once reward sent - MEED-3437 - Meeds-io/MIPs#122 #514

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ public Response getRewardReportPeriods(@Parameter(description = "Offset of resul
if (offset < 0) {
return Response.status(Response.Status.BAD_REQUEST).entity("Offset must be 0 or positive").build();
}
List<RewardPeriod> rewardPeriods = rewardReportService.findRewardPeriodsBetween(from, to, offset, limit);
List<RewardPeriod> rewardPeriods;
if (from >= 0 && to > 0) {
rewardPeriods = rewardReportService.findRewardPeriodsBetween(from, to, offset, limit);
} else {
rewardPeriods = rewardReportService.findRewardReportPeriods(offset, limit);
}
return Response.ok(rewardPeriods).build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/
export function getRewardReportPeriods(from, to, offset, limit) {
return fetch(`/portal/rest/wallet/api/reward/periods?from=${from}&to=${to}&offset=${offset || 0}&limit=${limit|| 10}`, {
return fetch(`/portal/rest/wallet/api/reward/periods?from=${from || 0}&to=${to || 0}&offset=${offset || 0}&limit=${limit|| 10}`, {
method: 'GET',
credentials: 'include',
headers: {
Expand Down