From ad24d5b2de424680988c783ce399537051c31ed1 Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Thu, 6 Mar 2025 17:28:25 -0600 Subject: [PATCH] fix: setting authority in appv2 depinject to match v1 (#244) `sdk.MustAccAddressFromBech32` for depinject authority --- module/depinject.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/depinject.go b/module/depinject.go index 00e4973..7c10aa3 100644 --- a/module/depinject.go +++ b/module/depinject.go @@ -4,6 +4,7 @@ import ( "os" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -60,7 +61,7 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { authority := authtypes.NewModuleAddress(govtypes.ModuleName) if in.Config.Authority != "" { - authority = authtypes.NewModuleAddress(in.Config.Authority) + authority = sdk.MustAccAddressFromBech32(in.Config.Authority) } k := keeper.NewKeeper(in.Cdc, in.StoreService, in.StakingKeeper, in.SlashingKeeper, in.BankKeeper, log.NewLogger(os.Stderr), authority.String())