only set contract version if ok
@@ -32,7 +32,9 @@ pub fn init<S: Storage, A: Api, Q: Querier>(
version: CONTRACT_VERSION.to_string(),
};
let result = whitelist_init(deps, env, msg);
+ if result.is_ok() {
set_contract_version(&mut deps.storage, &version)?;
+ };
result
}
