Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
emidev98 committed Jul 4, 2023
2 parents 8a32597 + 7fcf437 commit 608ccf1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/provider/alliance/alliance_protocols_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ func calculateNormalizedRewardWeight(
alliances []alliancetypes.AllianceAsset,
alliance alliancetypes.AllianceAsset,
) sdktypes.Dec {
// When TakeRateClaimInterval is zero it means that users are not
// receiving any rewards so NormalizedRewardWeight is zero (right now).
if params.TakeRateClaimInterval == 0 {
return sdktypes.ZeroDec()
}

// We shouldd consider that reward weight
// starts at one because it also takes in
// consideration the OneDec.
rewardsWeight := sdktypes.OneDec()
for _, alliance := range alliances {
// When an alliance is not initialized, it means that users are not
// receiving rewards so NormalizedRewardWeight is zero (right now).
if !alliance.IsInitialized {
return sdktypes.ZeroDec()
}
// If an alliance is not initialized it means that
// rewards are not distributed to that alliance so
// it has a reward weight of zero.
Expand Down

0 comments on commit 608ccf1

Please sign in to comment.