Skip to content

Commit

Permalink
Ignore wormhole transfers since they give bad addresses in non-UTF-8 …
Browse files Browse the repository at this point in the history
…format for sender or receiver (#503)
  • Loading branch information
pharr117 authored Oct 21, 2023
1 parent de7e6eb commit eaae9b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cosmos/modules/ibc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ibc

import (
"fmt"
"strings"

parsingTypes "github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules"
txModule "github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules/tx"
Expand Down Expand Up @@ -79,6 +80,13 @@ func (w *WrapperMsgRecvPacket) HandleMsg(msgType string, msg stdTypes.Msg, log *
return nil
}

senderAddress := data.Sender
receiverAddress := data.Receiver

if strings.Contains(senderAddress, "wormhole") || strings.Contains(receiverAddress, "wormhole") {
return nil
}

w.SenderAddress = data.Sender
w.ReceiverAddress = data.Receiver
w.Sequence = w.MsgRecvPacket.Packet.Sequence
Expand Down

0 comments on commit eaae9b4

Please sign in to comment.