Skip to content

Commit

Permalink
fix: address validation for CallServiceMessageRequest decode added
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju authored and redlarva committed Sep 6, 2023
1 parent 357061a commit ba48d78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/cosmwasm-vm/cw-xcall/src/handle_call_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<'a> CwCallService<'a> {
return Err(ContractError::ProtocolsMismatch);
}

let to = request.to();
let to = deps.api.addr_validate(request.to().as_str())?;

if request.protocols().len() > 1 {
let key = keccak256(data).to_vec();
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm-vm/cw-xcall/src/send_call_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'a> CwCallService<'a> {

let call_request = CallServiceMessageRequest::new(
from,
to.account(),
deps.api.addr_validate(to.account().as_str())?,
sequence_no,
need_response,
data.to_vec(),
Expand Down

0 comments on commit ba48d78

Please sign in to comment.