Skip to content

Commit

Permalink
add check for nil relayer
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed May 17, 2022
1 parent dabac81 commit 87ba078
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/apps/29-fee/keeper/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ func EmitIncentivizedPacketEvent(ctx sdk.Context, packetID channeltypes.PacketId
)

for _, fee := range packetFees.PacketFees {
totalRecvFees.Add(fee.Fee.RecvFee...)
totalAckFees.Add(fee.Fee.AckFee...)
totalTimeoutFees.Add(fee.Fee.TimeoutFee...)
// only emit total fees for packet fees which allow any relayer to relay
if fee.Relayers == nil {
totalRecvFees.Add(fee.Fee.RecvFee...)
totalAckFees.Add(fee.Fee.AckFee...)
totalTimeoutFees.Add(fee.Fee.TimeoutFee...)
}
}

ctx.EventManager().EmitEvent(
Expand Down

0 comments on commit 87ba078

Please sign in to comment.