Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Dec 9, 2024
1 parent 513931e commit 5bed137
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions x/feedistribution/keeper/allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"sort"

"cosmossdk.io/math"
sdkmath "cosmossdk.io/math"
avstypes "github.com/ExocoreNetwork/exocore/x/avs/types"
"github.com/ExocoreNetwork/exocore/x/feedistribution/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -45,9 +44,9 @@ func (k Keeper) AllocateTokens(ctx sdk.Context, isSlash bool) error {
return errors.New("failed to AllocateTokens on slash event for minted coins calculation fail")
}
} else {
passedDuration := sdkmath.LegacyNewDec(int64(ctx.BlockTime().Sub(epochInfo.StartTime)))
epochDuration := sdkmath.LegacyNewDec(int64(epochInfo.Duration))
mintedCoinDec.Amount.MulMut(sdkmath.LegacyOneDec().Sub(passedDuration.QuoTruncate(epochDuration)))
passedDuration := math.LegacyNewDec(int64(ctx.BlockTime().Sub(epochInfo.StartTime)))
epochDuration := math.LegacyNewDec(int64(epochInfo.Duration))
mintedCoinDec.Amount.MulMut(math.LegacyOneDec().Sub(passedDuration.QuoTruncate(epochDuration)))
feesCollected.Sub(sdk.DecCoins{mintedCoinDec})
}
}
Expand Down

0 comments on commit 5bed137

Please sign in to comment.