Skip to content

Commit

Permalink
Return packet sequence in IBCRawPacketHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehsan-saradar committed Jan 11, 2023
1 parent 6bb783a commit 2bef8ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion x/wasm/keeper/handler_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,13 @@ func (h IBCRawPacketHandler) DispatchMsg(ctx sdk.Context, _ sdk.AccAddress, cont
ConvertWasmIBCTimeoutHeightToCosmosHeight(msg.IBC.SendPacket.Timeout.Block),
msg.IBC.SendPacket.Timeout.Timestamp,
)
return nil, nil, h.channelKeeper.SendPacket(ctx, channelCap, packet)
if err := h.channelKeeper.SendPacket(ctx, channelCap, packet); err != nil {
return nil, nil, sdkerrors.Wrap(err, "failed to send packet")
}

// Encode the sequence in big endian order and append it to data so that it can be retrieved by contract
data = append(data, sdk.Uint64ToBigEndian(sequence))
return
}

var _ Messenger = MessageHandlerFunc(nil)
Expand Down

0 comments on commit 2bef8ea

Please # to comment.