Skip to content

Commit

Permalink
moved some comments around and disabled forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
gjermundgaraba committed Dec 19, 2024
1 parent edde08f commit 18c48f8
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions modules/apps/transfer/v2/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,26 @@ func (im *IBCModule) OnRecvPacket(ctx context.Context, sourceChannel string, des

im.keeper.Logger(ctx).Info("successfully handled ICS-20 packet", "sequence", sequence)

// TODO: forwarding
// if data.HasForwarding() {
// // we are now sending from the forward escrow address to the final receiver address.
// TODO: inside this version of the function, we should fetch the packet that was stored in IBC core in order to set it for forwarding.
// if err := k.forwardPacket(ctx, data, packet, receivedCoins); err != nil {
// return err
// }
// }

// TODO: telemetry
// telemetry.ReportOnRecvPacket(packet, data.Tokens)

if data.HasForwarding() {
// NOTE: acknowledgement will be written asynchronously
// we are now sending from the forward escrow address to the final receiver address.
ack = channeltypes.NewErrorAcknowledgement(fmt.Errorf("forwarding not yet supported"))
return types.RecvPacketResult{
Status: types.PacketStatus_Async,
Status: types.PacketStatus_Failure,
Acknowledgement: ack.Acknowledgement(),
}
// TODO: handle forwarding
// TODO: inside this version of the function, we should fetch the packet that was stored in IBC core in order to set it for forwarding.
// if err := k.forwardPacket(ctx, data, packet, receivedCoins); err != nil {
// return err
// }

// NOTE: acknowledgement will be written asynchronously
// return types.RecvPacketResult{
// Status: types.PacketStatus_Async,
// }
}

// NOTE: acknowledgement will be written synchronously during IBC handler execution.
Expand Down

0 comments on commit 18c48f8

Please sign in to comment.