Skip to content

Commit

Permalink
add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed May 21, 2024
1 parent 0ff49ca commit a69e123
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/attribute/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam
}

k.SetParams(ctx, msg.Params)
ctx.EventManager().EmitTypedEvent(types.NewEventAttributeParamsUpdated(msg.Params))
if err := ctx.EventManager().EmitTypedEvent(types.NewEventAttributeParamsUpdated(msg.Params)); err != nil {
return nil, err
}

return &types.MsgUpdateParamsResponse{}, nil
}

0 comments on commit a69e123

Please sign in to comment.