diff --git a/crates/ibc/src/lib.rs b/crates/ibc/src/lib.rs index 0d70c52419..021a165cf6 100644 --- a/crates/ibc/src/lib.rs +++ b/crates/ibc/src/lib.rs @@ -78,7 +78,7 @@ pub use msg::*; use namada_core::address::{self, Address, MASP}; use namada_core::masp::PaymentAddress; use namada_events::extend::{ReadFromEventAttributes, Success as SuccessAttr}; -use namada_token::UnshieldingTransfer; +use namada_token::ShieldingTransfer; pub use nft::*; use prost::Message; use thiserror::Error; @@ -154,7 +154,7 @@ where pub fn execute( &mut self, tx_data: &[u8], - ) -> Result, Error> { + ) -> Result, Error> { let message = decode_message(tx_data)?; match &message { IbcMessage::Transfer(msg) => { diff --git a/crates/ibc/src/msg.rs b/crates/ibc/src/msg.rs index 7b607617f1..7502cf1e31 100644 --- a/crates/ibc/src/msg.rs +++ b/crates/ibc/src/msg.rs @@ -7,7 +7,7 @@ use ibc::core::channel::types::msgs::{ }; use ibc::core::handler::types::msgs::MsgEnvelope; use ibc::primitives::proto::Protobuf; -use namada_token::UnshieldingTransfer; +use namada_token::ShieldingTransfer; /// The different variants of an Ibc message pub enum IbcMessage { @@ -31,7 +31,7 @@ pub struct MsgTransfer { /// IBC transfer message pub message: IbcMsgTransfer, /// Shieleded transfer for MASP transaction - pub transfer: Option, + pub transfer: Option, } impl BorshSerialize for MsgTransfer { @@ -50,7 +50,7 @@ impl BorshDeserialize for MsgTransfer { reader: &mut R, ) -> std::io::Result { use std::io::{Error, ErrorKind}; - let (msg, transfer): (Vec, Option) = + let (msg, transfer): (Vec, Option) = BorshDeserialize::deserialize_reader(reader)?; let message = IbcMsgTransfer::decode_vec(&msg) .map_err(|err| Error::new(ErrorKind::InvalidData, err))?; @@ -64,7 +64,7 @@ pub struct MsgNftTransfer { /// IBC NFT transfer message pub message: IbcMsgNftTransfer, /// Shieleded transfer for MASP transaction - pub transfer: Option, + pub transfer: Option, } impl BorshSerialize for MsgNftTransfer { @@ -83,7 +83,7 @@ impl BorshDeserialize for MsgNftTransfer { reader: &mut R, ) -> std::io::Result { use std::io::{Error, ErrorKind}; - let (msg, transfer): (Vec, Option) = + let (msg, transfer): (Vec, Option) = BorshDeserialize::deserialize_reader(reader)?; let message = IbcMsgNftTransfer::decode_vec(&msg) .map_err(|err| Error::new(ErrorKind::InvalidData, err))?; @@ -97,7 +97,7 @@ pub struct MsgRecvPacket { /// IBC receiving packet message pub message: IbcMsgRecvPacket, /// Shieleded transfer for MASP transaction - pub transfer: Option, + pub transfer: Option, } impl BorshSerialize for MsgRecvPacket { @@ -116,7 +116,7 @@ impl BorshDeserialize for MsgRecvPacket { reader: &mut R, ) -> std::io::Result { use std::io::{Error, ErrorKind}; - let (msg, transfer): (Vec, Option) = + let (msg, transfer): (Vec, Option) = BorshDeserialize::deserialize_reader(reader)?; let message = IbcMsgRecvPacket::decode_vec(&msg) .map_err(|err| Error::new(ErrorKind::InvalidData, err))?; @@ -131,7 +131,7 @@ pub struct MsgAcknowledgement { /// IBC acknowledgement message pub message: IbcMsgAcknowledgement, /// Shieleded transfer for MASP transaction - pub transfer: Option, + pub transfer: Option, } impl BorshSerialize for MsgAcknowledgement { @@ -150,7 +150,7 @@ impl BorshDeserialize for MsgAcknowledgement { reader: &mut R, ) -> std::io::Result { use std::io::{Error, ErrorKind}; - let (msg, transfer): (Vec, Option) = + let (msg, transfer): (Vec, Option) = BorshDeserialize::deserialize_reader(reader)?; let message = IbcMsgAcknowledgement::decode_vec(&msg) .map_err(|err| Error::new(ErrorKind::InvalidData, err))?; @@ -165,7 +165,7 @@ pub struct MsgTimeout { /// IBC timeout message pub message: IbcMsgTimeout, /// Shieleded transfer for MASP transaction - pub transfer: Option, + pub transfer: Option, } impl BorshSerialize for MsgTimeout { @@ -184,7 +184,7 @@ impl BorshDeserialize for MsgTimeout { reader: &mut R, ) -> std::io::Result { use std::io::{Error, ErrorKind}; - let (msg, transfer): (Vec, Option) = + let (msg, transfer): (Vec, Option) = BorshDeserialize::deserialize_reader(reader)?; let message = IbcMsgTimeout::decode_vec(&msg) .map_err(|err| Error::new(ErrorKind::InvalidData, err))?; diff --git a/crates/node/src/bench_utils.rs b/crates/node/src/bench_utils.rs index f871f8c4ea..956dfe8bce 100644 --- a/crates/node/src/bench_utils.rs +++ b/crates/node/src/bench_utils.rs @@ -1201,7 +1201,7 @@ impl BenchShieldedCtx { timeout_timestamp_on_b: timeout_timestamp, }; - let transfer = UnshieldingTransfer::deserialize( + let transfer = ShieldingTransfer::deserialize( &mut tx.tx.data(&tx.cmt).unwrap().as_slice(), ) .unwrap(); diff --git a/crates/sdk/src/tx.rs b/crates/sdk/src/tx.rs index a2554b220c..fe965dde3d 100644 --- a/crates/sdk/src/tx.rs +++ b/crates/sdk/src/tx.rs @@ -2567,9 +2567,9 @@ pub async fn build_ibc_transfer( let transfer = shielded_parts.map(|(shielded_transfer, asset_types)| { let masp_tx_hash = tx.add_masp_tx_section(shielded_transfer.masp_tx.clone()).1; - let transfer = token::UnshieldingTransfer { + let transfer = token::ShieldingTransfer { // The token will be escrowed to IBC address - target: Address::Internal(InternalAddress::Ibc), + source: source.clone(), token: args.token.clone(), amount: validated_amount, // Link the Transfer to the MASP Transaction by hash code