Skip to content

Commit 254f3bd

Browse files
julienrbrtmergify[bot]
authored andcommitted
refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590)
(cherry picked from commit aeb1e8f) # Conflicts: # CHANGELOG.md # x/authz/module/module.go # x/feegrant/module/module.go
1 parent 7009a2e commit 254f3bd

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,22 @@ Ref: https://keepachangelog.com/en/1.0.0/
3737

3838
## [Unreleased]
3939

40+
<<<<<<< HEAD
4041
## [v0.47.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.11) - 2024-04-22
42+
=======
43+
## Improvements
44+
45+
* (x/authz,x/feegrant) [#20590](https://github.com/cosmos/cosmos-sdk/pull/20590) Provide updated keeper in depinject for authz and feegrant modules.
46+
47+
## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04
48+
49+
### Improvements
50+
51+
* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd.
52+
* (runtime) [#20264](https://github.com/cosmos/cosmos-sdk/pull/20264) Expose grpc query router via depinject.
53+
* (x/consensus) [#20381](https://github.com/cosmos/cosmos-sdk/pull/20381) Use Comet utility for consensus module consensus param updates.
54+
* (client) [#20356](https://github.com/cosmos/cosmos-sdk/pull/20356) Overwrite client context when available in `SetCmdClientContext`.
55+
>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590))
4156
4257
### Bug Fixes
4358

x/authz/module/module.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ type AuthzOutputs struct {
192192
func ProvideModule(in AuthzInputs) AuthzOutputs {
193193
k := keeper.NewKeeper(in.Key, in.Cdc, in.MsgServiceRouter, in.AccountKeeper)
194194
m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.Registry)
195+
<<<<<<< HEAD
195196
return AuthzOutputs{AuthzKeeper: k, Module: m}
197+
=======
198+
return ModuleOutputs{AuthzKeeper: k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, Module: m}
199+
>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590))
196200
}
197201

198202
// ____________________________________________________________________________

x/feegrant/module/module.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,13 @@ type AppModule struct {
120120
// NewAppModule creates a new AppModule object
121121
func NewAppModule(cdc codec.Codec, ak feegrant.AccountKeeper, bk feegrant.BankKeeper, keeper keeper.Keeper, registry cdctypes.InterfaceRegistry) AppModule {
122122
return AppModule{
123+
<<<<<<< HEAD
123124
AppModuleBasic: AppModuleBasic{cdc: cdc},
124125
keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47,
126+
=======
127+
AppModuleBasic: AppModuleBasic{cdc: cdc, ac: ak.AddressCodec()},
128+
keeper: keeper.SetBankKeeper(bk), // Super ugly hack to not be api breaking in v0.50 and v0.47
129+
>>>>>>> aeb1e8f46 (refactor(x/authz,x/feegrant): provide updated keeper in depinject (#20590))
125130
accountKeeper: ak,
126131
bankKeeper: bk,
127132
registry: registry,
@@ -197,7 +202,7 @@ type FeegrantInputs struct {
197202
func ProvideModule(in FeegrantInputs) (keeper.Keeper, appmodule.AppModule) {
198203
k := keeper.NewKeeper(in.Cdc, in.Key, in.AccountKeeper)
199204
m := NewAppModule(in.Cdc, in.AccountKeeper, in.BankKeeper, k, in.Registry)
200-
return k, m
205+
return k.SetBankKeeper(in.BankKeeper) /* depinject ux improvement */, m
201206
}
202207

203208
// AppModuleSimulation functions

0 commit comments

Comments
 (0)