Skip to content

Commit

Permalink
refactor(mint): fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed May 21, 2024
1 parent 122aafd commit 7e20ed9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions x/mint/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ import (
)

// InitGenesis new mint genesis.
func (keeper Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) {
if err := keeper.Minter.Set(ctx, data.Minter); err != nil {
func (k Keeper) InitGenesis(ctx sdk.Context, ak types.AccountKeeper, data *types.GenesisState) {
if err := k.Minter.Set(ctx, data.Minter); err != nil {
panic(err)
}

if err := keeper.Params.Set(ctx, data.Params); err != nil {
if err := k.Params.Set(ctx, data.Params); err != nil {
panic(err)
}

ak.GetModuleAccount(ctx, types.ModuleName)
}

// ExportGenesis returns a GenesisState for a given context and keeper.
func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState {
minter, err := keeper.Minter.Get(ctx)
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState {
minter, err := k.Minter.Get(ctx)
if err != nil {
panic(err)
}

params, err := keeper.Params.Get(ctx)
params, err := k.Params.Get(ctx)
if err != nil {
panic(err)
}
Expand Down
8 changes: 4 additions & 4 deletions x/mint/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/axone-protocol/axoned/v7/x/mint/types"
)

// Keeper of the mint store
// Keeper of the mint store.
type Keeper struct {
cdc codec.BinaryCodec
storeService storetypes.KVStoreService
Expand All @@ -32,7 +32,7 @@ type Keeper struct {
Minter collections.Item[types.Minter]
}

// NewKeeper creates a new mint Keeper instance
// NewKeeper creates a new mint Keeper instance.
func NewKeeper(
cdc codec.BinaryCodec,
storeService storetypes.KVStoreService,
Expand Down Expand Up @@ -80,8 +80,8 @@ func (k Keeper) Logger(ctx context.Context) log.Logger {

// TokenSupply implements an alias call to the underlying bank keeper's
// TokenSupply to be used in BeginBlocker.
func (keeper Keeper) TokenSupply(ctx context.Context, denom string) math.Int {
return keeper.bankKeeper.GetSupply(ctx, denom).Amount
func (k Keeper) TokenSupply(ctx context.Context, denom string) math.Int {
return k.bankKeeper.GetSupply(ctx, denom).Amount
}

// StakingTokenSupply implements an alias call to the underlying staking keeper's
Expand Down

0 comments on commit 7e20ed9

Please sign in to comment.