Skip to content

Commit

Permalink
fix(ucs01): pass ics20 ack directly
Browse files Browse the repository at this point in the history
Signed-off-by: aeryz <abdullaheryz@protonmail.com>
  • Loading branch information
aeryz committed Jun 10, 2024
1 parent 5f33dbd commit da67107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cosmwasm/ucs01-relay-api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ impl TryFrom<Binary> for Ics20Ack {
impl From<Ics20Ack> for GenericAck {
fn from(value: Ics20Ack) -> Self {
match value {
Ics20Ack::Result(err) => Ok(err),
Ics20Ack::Error(err) => Err(err.into_bytes().into()),
Ics20Ack::Result(_) => Ok(value.try_into().unwrap()),
Ics20Ack::Error(_) => Err(value.try_into().unwrap()),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/ucs01-relay/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ impl<'a> TransferProtocol for Ics20Protocol<'a> {
match foreign_protocol {
Ucs01Protocol::VERSION => Ok(match ack {
Ok(_) => Ucs01Protocol::ack_success(),
Err(e) => Ucs01Protocol::ack_failure(e.to_string()),
Err(_) => Ucs01Protocol::ack_failure("".into()),
}
.into()),
Ics20Protocol::VERSION => Ok(ack),
Expand Down

0 comments on commit da67107

Please sign in to comment.