Skip to content

Commit

Permalink
Remove redundant mint event
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Nov 8, 2024
1 parent 4b02612 commit 752dec2
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions x/babylon/keeper/handler_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 752dec2

Please sign in to comment.