diff --git a/x/gamm/handler.go b/x/gamm/handler.go index d21973598dd..fd5a51a943d 100644 --- a/x/gamm/handler.go +++ b/x/gamm/handler.go @@ -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) diff --git a/x/gamm/keeper/msg_server.go b/x/gamm/keeper/msg_server.go index b50b00ab383..9e8be5cc551 100644 --- a/x/gamm/keeper/msg_server.go +++ b/x/gamm/keeper/msg_server.go @@ -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, } diff --git a/x/gamm/module.go b/x/gamm/module.go index 741c8e70cd5..b454a1f2838 100644 --- a/x/gamm/module.go +++ b/x/gamm/module.go @@ -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) } @@ -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. diff --git a/x/incentives/handler.go b/x/incentives/handler.go index 3699892cdb1..2f2b38c94c6 100644 --- a/x/incentives/handler.go +++ b/x/incentives/handler.go @@ -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) diff --git a/x/incentives/keeper/msg_server.go b/x/incentives/keeper/msg_server.go index d532b0ceec0..369a2c0f59b 100644 --- a/x/incentives/keeper/msg_server.go +++ b/x/incentives/keeper/msg_server.go @@ -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, } diff --git a/x/incentives/module.go b/x/incentives/module.go index f993ad7a40e..417c3e1e823 100644 --- a/x/incentives/module.go +++ b/x/incentives/module.go @@ -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. diff --git a/x/superfluid/handler.go b/x/superfluid/handler.go index ccbdbda14d6..4436b78ebf8 100644 --- a/x/superfluid/handler.go +++ b/x/superfluid/handler.go @@ -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) diff --git a/x/superfluid/keeper/msg_server.go b/x/superfluid/keeper/msg_server.go index bde28ee17df..74347481f2b 100644 --- a/x/superfluid/keeper/msg_server.go +++ b/x/superfluid/keeper/msg_server.go @@ -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, } diff --git a/x/superfluid/module.go b/x/superfluid/module.go index db4ae2e33c7..b02e086d782 100644 --- a/x/superfluid/module.go +++ b/x/superfluid/module.go @@ -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.