Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp: relax timeout check in MsgTransfer conversions #1363

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading