Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
🎨 Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
priojeetpriyom committed Dec 20, 2023
1 parent f8e0fef commit a5b10f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const calcSelfStakeReward = async (generatorAddress, blockReward, commissionAmou
{ amount: BigInt('0') },
);

// Return commission as 0 if self stake is 0
// Return commission as 0 if total stake is 0. Skip further calculations to avoid division by zero
if (totalStakes <= BigInt('0')) {
return BigInt('0');
}
Expand Down

0 comments on commit a5b10f1

Please sign in to comment.