Skip to content

Commit

Permalink
add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Apr 23, 2024
1 parent d971bc5 commit aa55e50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/ophost/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ func (ms MsgServer) DeleteOutput(ctx context.Context, req *types.MsgDeleteOutput
}

// rollback next output index to the deleted output index
ms.NextOutputIndexes.Set(ctx, bridgeId, outputIndex)
if err := ms.NextOutputIndexes.Set(ctx, bridgeId, outputIndex); err != nil {
return nil, err
}

Check warning on line 201 in x/ophost/keeper/msg_server.go

View check run for this annotation

Codecov / codecov/patch

x/ophost/keeper/msg_server.go#L200-L201

Added lines #L200 - L201 were not covered by tests

sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent(sdk.NewEvent(
types.EventTypeDeleteOutput,
Expand Down

0 comments on commit aa55e50

Please sign in to comment.