diff --git a/packages/cw2/src/lib.rs b/packages/cw2/src/lib.rs index b3e152a75..201b77ae8 100644 --- a/packages/cw2/src/lib.rs +++ b/packages/cw2/src/lib.rs @@ -61,8 +61,9 @@ pub fn assert_contract_version( expected_contract: &str, expected_version: &str, ) -> Result<(), VersionError> { - let Some(ContractVersion { contract, version }) = CONTRACT.may_load(storage)? else { - return Err(VersionError::NotFound); + let ContractVersion { contract, version } = match CONTRACT.may_load(storage)? { + Some(contract) => contract, + None => return Err(VersionError::NotFound), }; if contract != expected_contract {