Skip to content

Commit

Permalink
Merge pull request #887 from crypto-com/fix/eth-ibc-tx
Browse files Browse the repository at this point in the history
Fix: duplicated attribute key error
  • Loading branch information
vincentysc authored Jul 18, 2024
2 parents 143f1e9 + 946c47c commit 25787c4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions usecase/parser/ibc/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1154,11 +1154,13 @@ func IsPacketMsgTransfer(
}

// check for evm msgRecvPacket
recvPacketEvent := log.GetEventByType("recv_packet")
if recvPacketEvent != nil {
if recvPacketEvent.HasAttribute("packet_dst_port") {
if recvPacketEvent.MustGetAttributeByKey("packet_dst_port") == "transfer" {
return true
recvPacketEvents := log.GetEventsByType("recv_packet")
if len(recvPacketEvents) > 0 {
for _, recvPacketEvent := range recvPacketEvents {
if recvPacketEvent.HasAttribute("packet_dst_port") {
if recvPacketEvent.MustGetAttributeByKey("packet_dst_port") == "transfer" {
return true
}
}
}
}
Expand Down

0 comments on commit 25787c4

Please sign in to comment.