mirror of
https://github.com/0glabs/0g-chain.git
synced 2025-01-12 16:25:17 +00:00
fix: add new event manager to ctx in handlers (#485)
This commit is contained in:
parent
8f3858509a
commit
471565e360
@ -8,6 +8,7 @@ import (
|
||||
// NewHandler creates an sdk.Handler for cdp messages
|
||||
func NewHandler(k Keeper) sdk.Handler {
|
||||
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
|
||||
ctx = ctx.WithEventManager(sdk.NewEventManager())
|
||||
switch msg := msg.(type) {
|
||||
case MsgCreateCDP:
|
||||
return handleMsgCreateCDP(ctx, k, msg)
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
// NewHandler creates an sdk.Handler for kavadist messages
|
||||
func NewHandler(k Keeper) sdk.Handler {
|
||||
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
|
||||
ctx = ctx.WithEventManager(sdk.NewEventManager())
|
||||
switch msg := msg.(type) {
|
||||
default:
|
||||
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", ModuleName, msg)
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
// NewHandler handles all pricefeed type messages
|
||||
func NewHandler(k Keeper) sdk.Handler {
|
||||
return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) {
|
||||
ctx = ctx.WithEventManager(sdk.NewEventManager())
|
||||
switch msg := msg.(type) {
|
||||
case MsgPostPrice:
|
||||
return HandleMsgPostPrice(ctx, k, msg)
|
||||
|
Loading…
Reference in New Issue
Block a user