Skip to content

Commit

Permalink
prevent future name clashing and revert app.go changes (in favor of #…
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jul 20, 2022
1 parent 5f9ce38 commit c68734b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
11 changes: 1 addition & 10 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,8 @@ func NewSimApp(
app = &SimApp{}
appBuilder *runtime.AppBuilder

// authorities definition
bankAuthority = banktypes.Authority(authtypes.NewModuleAddress(govtypes.ModuleName))

// merge the app.yaml and the appOpts in one config
appConfig = depinject.Configs(
AppConfig,
depinject.Supply(
appOpts,
bankAuthority,
),
)
appConfig = depinject.Configs(AppConfig, depinject.Supply(appOpts))
)

if err := depinject.Inject(appConfig,
Expand Down
4 changes: 2 additions & 2 deletions x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ type bankInputs struct {
Key *store.KVStoreKey

AccountKeeper types.AccountKeeper
Authority types.Authority `optional:"true"`
Authority types.BankAuthority `optional:"true"`

// LegacySubspace is used solely for migration of x/params managed parameters
LegacySubspace exported.Subspace
Expand Down Expand Up @@ -266,7 +266,7 @@ func provideModule(in bankInputs) bankOutputs {
authority := in.Authority
if authority == nil || len(authority) == 0 {
// default to governance authority if not provided
authority = types.Authority(authtypes.NewModuleAddress(govtypes.ModuleName))
authority = types.BankAuthority(authtypes.NewModuleAddress(govtypes.ModuleName))
}

bankKeeper := keeper.NewBaseKeeper(
Expand Down
4 changes: 2 additions & 2 deletions x/bank/types/authority.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

type Authority sdk.AccAddress
type BankAuthority sdk.AccAddress

func (a Authority) String() string {
func (a BankAuthority) String() string {
return sdk.AccAddress(a).String()
}

0 comments on commit c68734b

Please sign in to comment.