From 0df520333d9311286e3d0ae230231022ce623f53 Mon Sep 17 00:00:00 2001 From: vincentysc Date: Tue, 17 Oct 2023 10:13:00 +0800 Subject: [PATCH] skip ibc transfer indexing when no packet data amount is provided --- projection/ibc_channel/ibc_channel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projection/ibc_channel/ibc_channel.go b/projection/ibc_channel/ibc_channel.go index e81eb72a..f45f24bf 100644 --- a/projection/ibc_channel/ibc_channel.go +++ b/projection/ibc_channel/ibc_channel.go @@ -424,9 +424,10 @@ func (projection *IBCChannel) HandleEvents(height int64, events []event_entity.E } var amount string - if msgIBCTransferTransfer.Params.PacketData.Amount != nil { - amount = msgIBCTransferTransfer.Params.PacketData.Amount.String() + if msgIBCTransferTransfer.Params.PacketData.Amount == nil { + return nil } + amount = msgIBCTransferTransfer.Params.PacketData.Amount.String() denom := msgIBCTransferTransfer.Params.PacketData.Denom destinationChannelID := msgIBCTransferTransfer.Params.DestinationChannel destinationPortID := msgIBCTransferTransfer.Params.DestinationPort