Skip to content

Commit

Permalink
imp: relax timeout check in MsgTransfer conversions (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani authored Oct 22, 2024
1 parent cdd4625 commit 5ae8860
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc-apps] Relax timeout check during `MsgTransfer` proto to domain
conversions ([#1362](https://github.com/cosmos/ibc-rs/issues/1362)).
7 changes: 0 additions & 7 deletions ibc-apps/ics20-transfer/types/src/msgs/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ impl TryFrom<RawMsgTransfer> for MsgTransfer {
let timeout_height_on_b: TimeoutHeight = raw_msg.timeout_height.try_into()?;
let timeout_timestamp_on_b: TimeoutTimestamp = raw_msg.timeout_timestamp.into();

// Packet timeout height and packet timeout timestamp cannot both be unset.
if !timeout_height_on_b.is_set() && !timeout_timestamp_on_b.is_set() {
return Err(DecodingError::missing_raw_data(
"msg transfer timeout height or timeout timestamp",
));
}

Ok(MsgTransfer {
port_id_on_a: raw_msg.source_port.parse()?,
chan_id_on_a: raw_msg.source_channel.parse()?,
Expand Down
7 changes: 0 additions & 7 deletions ibc-apps/ics721-nft-transfer/types/src/msgs/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ impl TryFrom<RawMsgTransfer> for MsgTransfer {
let timeout_height_on_b: TimeoutHeight = raw_msg.timeout_height.try_into()?;
let timeout_timestamp_on_b: TimeoutTimestamp = raw_msg.timeout_timestamp.into();

// Packet timeout height and packet timeout timestamp cannot both be unset.
if !timeout_height_on_b.is_set() && !timeout_timestamp_on_b.is_set() {
return Err(DecodingError::missing_raw_data(
"missing timeout height or timeout timestamp",
));
}

let memo = if raw_msg.memo.is_empty() {
None
} else {
Expand Down

0 comments on commit 5ae8860

Please sign in to comment.