Skip to content

Commit

Permalink
Subdivided some functions involved in processing IBC packets.
Browse files Browse the repository at this point in the history
  • Loading branch information
murisi committed Jun 14, 2024
1 parent 438a4ab commit 08e5664
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 93 deletions.
6 changes: 3 additions & 3 deletions crates/core/src/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ impl Display for TransferSource {
/// Represents the pre-image to a TransparentAddress
#[derive(Debug, Clone, BorshDeserialize, BorshSerialize, BorshDeserializer)]
pub enum TAddrData {
/// A transparent address
/// A transparent address within Namada
Addr(Address),
/// An IBC address
Ibc(String),
Expand All @@ -509,7 +509,7 @@ impl TAddrData {
}

/// Get the contained IBC receiver, if any
pub fn payment_address(&self) -> Option<String> {
pub fn ibc_receiver_address(&self) -> Option<String> {
match self {
Self::Ibc(address) => Some(address.clone()),
_ => None,
Expand Down Expand Up @@ -583,7 +583,7 @@ impl TransferTarget {
}
}

/// Get the contained MaybeIbcAddress, if any
/// Get the contained TAddrData, if any
pub fn t_addr_data(&self) -> Option<TAddrData> {
match self {
Self::Address(x) => Some(TAddrData::Addr(x.clone())),
Expand Down
Loading

0 comments on commit 08e5664

Please sign in to comment.