Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#967] msg server impl usr ptr keepers #971

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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