Skip to content

Commit

Permalink
fixed bad channel fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslara committed Dec 5, 2024
1 parent 765f2b6 commit afa2d09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cosmwasm/packages/registry/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ impl<'a> Registry<'a> {

for chunk in &parts.chunks(2) {
let Some((port, channel)) = chunk.take(2).collect_tuple() else {
return Err(RegistryError::InvalidDenomTracePath{ path: path.clone(), denom: denom.into() });
return Err(RegistryError::InvalidDenomTracePath {
path: path.clone(),
denom: denom.into(),
});
};

// Check that the port is "transfer"
Expand Down Expand Up @@ -502,7 +505,7 @@ impl<'a> Registry<'a> {
// True), we get the channel from the registry
assert!(coin_type.is_native());
assert!(first_transfer_chain == receiver_chain);
let channel = self.get_channel(current_chain.as_ref(), first_transfer_chain)?;
let channel = self.get_channel(first_transfer_chain, current_chain.as_ref())?;
Ok(channel)
}
}?;
Expand Down

0 comments on commit afa2d09

Please sign in to comment.