Skip to content

Commit

Permalink
fix: setting authority in appv2 depinject to match v1 (#244)
Browse files Browse the repository at this point in the history
`sdk.MustAccAddressFromBech32` for depinject authority
  • Loading branch information
Reecepbcups authored Mar 6, 2025
1 parent 34aee49 commit ad24d5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit ad24d5b

Please sign in to comment.