From 99ba1dcd2c3c77e4f6ad7770772c81c91de5a0cf Mon Sep 17 00:00:00 2001 From: Kanstantsin Kastsevich Date: Thu, 30 May 2024 22:22:40 +0300 Subject: [PATCH] ensure accountKeeper (#528) --- custom/staking/keeper/keeper.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom/staking/keeper/keeper.go b/custom/staking/keeper/keeper.go index 0ddcaeed..25ec5512 100644 --- a/custom/staking/keeper/keeper.go +++ b/custom/staking/keeper/keeper.go @@ -26,7 +26,7 @@ type Keeper struct { authority string mintKeeper mintkeeper.Keeper distrKeeper distkeeper.Keeper - authKeeper minttypes.AccountKeeper + accountKeeper types.AccountKeeper } func (k Keeper) BlockValidatorUpdates(ctx context.Context) ([]abcicometbft.ValidatorUpdate, error) { @@ -142,6 +142,7 @@ func NewKeeper( cdc: cdc, mintKeeper: mintkeeper.Keeper{}, distrKeeper: distkeeper.Keeper{}, + accountKeeper: ak, } return &keeper } @@ -172,7 +173,7 @@ func (k Keeper) SlashWithInfractionReason(ctx context.Context, consAddr sdk.Cons if err != nil { k.Logger(ctx).Error("Failed to mint slashed coins: ", amountBurned) } else { - err = k.distrKeeper.FundCommunityPool(ctx, coins, k.authKeeper.GetModuleAddress(minttypes.ModuleName)) + err = k.distrKeeper.FundCommunityPool(ctx, coins, k.accountKeeper.GetModuleAddress(minttypes.ModuleName)) if err != nil { k.Logger(ctx).Error(fmt.Sprintf("Failed to fund community pool. Tokens minted to the staking module account: %d. ", amountBurned)) } else {