Skip to content

Commit

Permalink
[#967] msg server impl usr ptr keepers (#971) (#996)
Browse files Browse the repository at this point in the history
(cherry picked from commit a5e290a)

Co-authored-by: voluntatis_summ <93878971+voluntatis-summ@users.noreply.github.com>
  • Loading branch information
mergify[bot] and voluntatis-summ authored Feb 26, 2022
1 parent ac5f48b commit 2ce527e
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion x/gamm/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// NewHandler returns a handler for "gamm" type messages.
func NewHandler(k keeper.Keeper) sdk.Handler {
func NewHandler(k *keeper.Keeper) sdk.Handler {
msgServer := keeper.NewMsgServerImpl(k)
msgBalancerServer := keeper.NewBalancerMsgServerImpl(k)

Expand Down
6 changes: 3 additions & 3 deletions x/gamm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import (
)

type msgServer struct {
keeper Keeper
keeper *Keeper
}

func NewMsgServerImpl(keeper Keeper) types.MsgServer {
func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &msgServer{
keeper: keeper,
}
}

func NewBalancerMsgServerImpl(keeper Keeper) balancer.MsgServer {
func NewBalancerMsgServerImpl(keeper *Keeper) balancer.MsgServer {
return &msgServer{
keeper: keeper,
}
Expand Down
6 changes: 3 additions & 3 deletions x/gamm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ type AppModule struct {
}

func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
balancer.RegisterMsgServer(cfg.MsgServer(), keeper.NewBalancerMsgServerImpl(am.keeper))
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(&am.keeper))
balancer.RegisterMsgServer(cfg.MsgServer(), keeper.NewBalancerMsgServerImpl(&am.keeper))
types.RegisterQueryServer(cfg.QueryServer(), am.keeper)
}

Expand All @@ -118,7 +118,7 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {

// Route returns the message routing key for the gamm module.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
return sdk.NewRoute(types.RouterKey, NewHandler(&am.keeper))
}

// QuerierRoute returns the gamm module's querier route name.
Expand Down
2 changes: 1 addition & 1 deletion x/incentives/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// NewHandler returns msg handler for this module
func NewHandler(k keeper.Keeper) sdk.Handler {
func NewHandler(k *keeper.Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
ctx = ctx.WithEventManager(sdk.NewEventManager())
msgServer := keeper.NewMsgServerImpl(k)
Expand Down
4 changes: 2 additions & 2 deletions x/incentives/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
)

type msgServer struct {
keeper Keeper
keeper *Keeper
}

// NewMsgServerImpl returns an instance of MsgServer
func NewMsgServerImpl(keeper Keeper) types.MsgServer {
func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &msgServer{
keeper: keeper,
}
Expand Down
2 changes: 1 addition & 1 deletion x/incentives/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (am AppModule) Name() string {

// Route returns the capability module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
return sdk.NewRoute(types.RouterKey, NewHandler(&am.keeper))
}

// QuerierRoute returns the capability module's query routing key.
Expand Down
2 changes: 1 addition & 1 deletion x/superfluid/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

// NewHandler returns a handler for "superfluid" type messages.
func NewHandler(k keeper.Keeper) sdk.Handler {
func NewHandler(k *keeper.Keeper) sdk.Handler {
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
ctx = ctx.WithEventManager(sdk.NewEventManager())
msgServer := keeper.NewMsgServerImpl(k)
Expand Down
4 changes: 2 additions & 2 deletions x/superfluid/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
)

type msgServer struct {
keeper Keeper
keeper *Keeper
}

// NewMsgServerImpl returns an instance of MsgServer
func NewMsgServerImpl(keeper Keeper) types.MsgServer {
func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &msgServer{
keeper: keeper,
}
Expand Down
2 changes: 1 addition & 1 deletion x/superfluid/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (am AppModule) Name() string {

// Route returns the capability module's message routing key.
func (am AppModule) Route() sdk.Route {
return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
return sdk.NewRoute(types.RouterKey, NewHandler(&am.keeper))
}

// QuerierRoute returns the capability module's query routing key.
Expand Down

0 comments on commit 2ce527e

Please sign in to comment.