Skip to content

Commit

Permalink
fix: set module account in InitGenesis if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hallazzang committed Dec 18, 2024
1 parent 81f06d7 commit adf62d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/liquidvesting/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,8 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) error {
}
}

// Create the module account if it doesn't exist
k.accountKeeper.GetModuleAccount(ctx, types.ModuleName)

return nil
}
1 change: 1 addition & 0 deletions x/liquidvesting/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

type AccountKeeper interface {
AddressCodec() address.Codec
GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI
}

type BankKeeper interface {
Expand Down

0 comments on commit adf62d4

Please sign in to comment.