Skip to content

Commit

Permalink
fix: fix ibc packet forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurist-85 committed Oct 17, 2024
1 parent ee3ec69 commit 3b20b3d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x/erc20/ibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ func (im IBCMiddleware) OnRecvPacket(
) exported.Acknowledgement {
ack := im.Module.OnRecvPacket(ctx, packet, relayer)

// returning nil ack will prevent WriteAcknowledgement from occurring for forwarded packet.
// This is intentional so that the acknowledgement will be written later based on the ack/timeout of the forwarded packet.
//
// As the packet is forwarded, there no need to execute ERC20 module logic.
if ack == nil {
return nil
}

// return if the acknowledgement is an error ACK
if !ack.Success() {
return ack
Expand Down

0 comments on commit 3b20b3d

Please sign in to comment.