Skip to content

Commit

Permalink
chore: remove anti-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
PoisonPhang authored and aeryz committed Jun 5, 2024
1 parent e340783 commit 8a5838d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cosmwasm/ucs01-relay-api/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ pub trait TransferProtocol {
) -> Result<IbcBasicResponse<Self::CustomMsg>, Self::Error> {
let packet = Self::Packet::try_from(raw_packet.into())?;
// https://github.com/cosmos/ibc-go/blob/5ca37ef6e56a98683cf2b3b1570619dc9b322977/modules/apps/transfer/ibc_module.go#L261
let ack = Into::<GenericAck>::into(Self::Ack::try_from(raw_ack.clone().into())?);
let memo = Into::<String>::into(packet.extension().clone());
let ack: GenericAck = Self::Ack::try_from(raw_ack.clone().into())?.into();
let memo: String = packet.extension().clone().into();

if let Ok(memo) = serde_json_wasm::from_str::<Memo>(&memo) {
match memo {
Expand Down

0 comments on commit 8a5838d

Please sign in to comment.