diff --git a/Cargo.lock b/Cargo.lock index 720525a8..c4215979 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -791,6 +791,7 @@ dependencies = [ name = "drop-network-link" version = "1.0.0" dependencies = [ + "bech32 0.11.0", "cosmwasm-schema", "cosmwasm-std", "cw-ownable", diff --git a/contracts/network-link/.cargo/config b/contracts/network-link/.cargo/config index e7c9e578..3df01768 100644 --- a/contracts/network-link/.cargo/config +++ b/contracts/network-link/.cargo/config @@ -1,2 +1,2 @@ [alias] -schema = "run --bin drop-hook-tester-schema" +schema = "run --bin drop-network-link-schema" diff --git a/contracts/network-link/src/contract.rs b/contracts/network-link/src/contract.rs index e2b38b36..0184e65f 100644 --- a/contracts/network-link/src/contract.rs +++ b/contracts/network-link/src/contract.rs @@ -84,7 +84,7 @@ fn execute_link( address: String, ) -> ContractResult { let prefix = PREFIX.load(deps.storage)?; - if address.starts_with(&prefix) { + if !address.starts_with(&prefix) { return Err(ContractError::WrongPrefix {}); } bech32::decode(&address).map_err(|_| ContractError::WrongAddress {})?;