Skip to content

Commit

Permalink
fixing inflation by removing hard coded token count
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Oct 27, 2023
1 parent 4f6aff7 commit 8962583
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions x/jklmint/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ func FloatToBigInt(val float64) *big.Int {
}

func (k Keeper) GetInflation(ctx sdk.Context) (sdk.Dec, error) {
denom := k.GetParams(ctx).MintDenom
params := k.GetParams(ctx)
denom := params.MintDenom
coins := k.bankKeeper.GetSupply(ctx, denom)

amt := coins.Amount.ToDec()
Expand All @@ -96,7 +97,7 @@ func (k Keeper) GetInflation(ctx sdk.Context) (sdk.Dec, error) {

var blocksPerYearEstiamte int64 = (365 * 24 * 60 * 60) / 6

printedPerYear := blocksPerYearEstiamte * 10_000_000
printedPerYear := blocksPerYearEstiamte * 1_000_000 * params.TokensPerBlock

Check warning on line 100 in x/jklmint/keeper/keeper.go

View check run for this annotation

Codecov / codecov/patch

x/jklmint/keeper/keeper.go#L100

Added line #L100 was not covered by tests

inflate := sdk.NewDec(printedPerYear)

Expand Down

0 comments on commit 8962583

Please sign in to comment.