From 752dec2343cbeabddd0dd26defa9d862d2f99507 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Fri, 8 Nov 2024 11:05:35 +0700 Subject: [PATCH] Remove redundant mint event --- x/babylon/keeper/handler_plugin.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/x/babylon/keeper/handler_plugin.go b/x/babylon/keeper/handler_plugin.go index 2a68cf7..f14ec34 100644 --- a/x/babylon/keeper/handler_plugin.go +++ b/x/babylon/keeper/handler_plugin.go @@ -86,21 +86,9 @@ func (h CustomMsgHandler) handleMintRewardsMsg(ctx sdk.Context, actor sdk.AccAdd if err != nil { return nil, nil, nil, err } - if err != nil { - return nil, nil, nil, err - } - - rewards, err := h.k.MintBlockRewards(ctx, recipient, coin) - if err != nil { - return nil, nil, nil, err - } - return []sdk.Event{sdk.NewEvent( - types.EventTypeMintRewards, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(sdk.AttributeKeySender, actor.String()), - sdk.NewAttribute(sdk.AttributeKeyAmount, rewards.String()), - )}, nil, nil, nil + _, err = h.k.MintBlockRewards(ctx, recipient, coin) + return nil, nil, nil, err } // AuthSourceFn is helper for simple AuthSource types