Skip to content

Commit

Permalink
Merge pull request #1481 from multiversx/MEX-517-fix-user-accumulated…
Browse files Browse the repository at this point in the history
…-rewards

[MEX-517] fix user accumulated rewards
  • Loading branch information
claudiulataretu authored Sep 18, 2024
2 parents 10f6f34 + 42cae0e commit 286e83b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/farm/v2/services/farm.v2.compute.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class FarmComputeServiceV2
scAddress,
week,
);
rewardsForWeek = totalRewards[0].amount;
rewardsForWeek = totalRewards[0]?.amount ?? '0';
}

rewardsForWeek = rewardsPerWeek ?? rewardsForWeek;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/staking/services/staking.compute.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ export class StakingComputeService {
scAddress,
week,
);
rewardsForWeek = totalRewards[0].amount;
rewardsForWeek = totalRewards[0]?.amount ?? '0';
}

rewardsForWeek = rewardsPerWeek ?? rewardsForWeek;
Expand Down

0 comments on commit 286e83b

Please sign in to comment.