Skip to content

Commit

Permalink
MEX-650: Fix undefined amount in compute outdated contracts
Browse files Browse the repository at this point in the history
Signed-off-by: Claudiu Lataretu <[email protected]>
  • Loading branch information
claudiulataretu committed Jan 13, 2025
1 parent 138916f commit e02c5e4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ export class UserEnergyComputeService {
if (
!produceRewardsEnabled &&
outdatedClaimProgress &&
claimProgressTotalRewards[0].amount === '0'
(claimProgressTotalRewards.length === 0 ||
claimProgressTotalRewards[0].amount === '0')
) {
return new OutdatedContract();
}
Expand Down Expand Up @@ -223,7 +224,8 @@ export class UserEnergyComputeService {
if (
!isProducingRewards &&
outdatedClaimProgress &&
claimProgressTotalRewards[0].amount === '0'
(claimProgressTotalRewards.length === 0 ||
claimProgressTotalRewards[0].amount === '0')
) {
return new OutdatedContract();
}
Expand Down

0 comments on commit e02c5e4

Please sign in to comment.