Skip to content

Commit

Permalink
fix: patch valid source check
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju committed Jul 5, 2024
1 parent 98dd4b1 commit ce8236e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/cosmwasm-vm/cw-xcall/src/handle_call_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,14 @@ impl<'a> CwCallService<'a> {
if protocols.contains(source) {
return Ok(true);
}
let default_conn = self.get_default_connection(store, src_net)?;
Ok(source.clone() == default_conn)
if protocols.len() == 0 {
let default_conn = self.get_default_connection(store, src_net)?;
Ok(source.clone() == default_conn)
}
else {
Ok(false)
}

}

pub fn handle_error(
Expand Down

0 comments on commit ce8236e

Please sign in to comment.