diff --git a/contracts/core-contracts/cw-asset-manager/src/contract.rs b/contracts/core-contracts/cw-asset-manager/src/contract.rs index 33624a8..7f23806 100644 --- a/contracts/core-contracts/cw-asset-manager/src/contract.rs +++ b/contracts/core-contracts/cw-asset-manager/src/contract.rs @@ -135,13 +135,7 @@ pub fn execute( ); let recipient: NetworkAddress = match to { - Some(to_address) => { - let nw_addr = NetworkAddress::from_str(&to_address).unwrap(); - if !nw_addr.validate_foreign_addresses() { - return Err(ContractError::InvalidRecipientAddress); - } - nw_addr - } + Some(to_address) => NetworkAddress::from_str(&to_address).unwrap(), // if `to` is not provided, sender address is used as recipient None => depositor, }; @@ -175,13 +169,7 @@ pub fn execute( ensure!(!amount.is_zero(), ContractError::InvalidAmount); let recipient: NetworkAddress = match to { - Some(to_address) => { - let nw_addr = NetworkAddress::from_str(&to_address).unwrap(); - if !nw_addr.validate_foreign_addresses() { - return Err(ContractError::InvalidRecipientAddress); - } - nw_addr - } + Some(to_address) => NetworkAddress::from_str(&to_address).unwrap(), // if `to` is not provided, sender address is used as recipient None => depositor, }; diff --git a/contracts/token-contracts/cw-hub-bnusd/src/contract.rs b/contracts/token-contracts/cw-hub-bnusd/src/contract.rs index b61b520..578f99f 100644 --- a/contracts/token-contracts/cw-hub-bnusd/src/contract.rs +++ b/contracts/token-contracts/cw-hub-bnusd/src/contract.rs @@ -295,9 +295,6 @@ mod execute { amount: u128, data: Vec, ) -> Result { - if !to.validate_foreign_addresses() { - return Err(ContractError::InvalidNetworkAddress); - } ensure!(amount > 0, ContractError::InvalidAmount); let funds = info.funds.clone();