From da67107ec84f6a98e1c2b472a8521a62522fc7fc Mon Sep 17 00:00:00 2001 From: aeryz Date: Mon, 10 Jun 2024 10:22:17 +0300 Subject: [PATCH] fix(ucs01): pass ics20 ack directly Signed-off-by: aeryz --- cosmwasm/ucs01-relay-api/src/types.rs | 4 ++-- cosmwasm/ucs01-relay/src/protocol.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cosmwasm/ucs01-relay-api/src/types.rs b/cosmwasm/ucs01-relay-api/src/types.rs index 9224c79b1a..e5b9834d2a 100644 --- a/cosmwasm/ucs01-relay-api/src/types.rs +++ b/cosmwasm/ucs01-relay-api/src/types.rs @@ -332,8 +332,8 @@ impl TryFrom for Ics20Ack { impl From 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()), } } } diff --git a/cosmwasm/ucs01-relay/src/protocol.rs b/cosmwasm/ucs01-relay/src/protocol.rs index 9b8c9f7f1d..ef7c05c966 100644 --- a/cosmwasm/ucs01-relay/src/protocol.rs +++ b/cosmwasm/ucs01-relay/src/protocol.rs @@ -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),