diff --git a/CHANGELOG.md b/CHANGELOG.md index 255c8c6..23a52a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.0.9] - 2014-04-15 + +### Fixed + +- Fix open and paused check + ## [0.0.8] - 2014-04-15 ### Changed @@ -65,4 +71,5 @@ and this project adheres to [0.0.5]: https://github.com/margined-protocol/vaultenator/0.0.4...0.0.5 [0.0.6]: https://github.com/margined-protocol/vaultenator/0.0.5...0.0.6 [0.0.7]: https://github.com/margined-protocol/vaultenator/0.0.6...0.0.7 -[0.0.7]: https://github.com/margined-protocol/vaultenator/0.0.7...0.0.8 +[0.0.8]: https://github.com/margined-protocol/vaultenator/0.0.7...0.0.8 +[0.0.9]: https://github.com/margined-protocol/vaultenator/0.0.8...0.0.9 diff --git a/Cargo.lock b/Cargo.lock index 3e53171..01693e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2282,7 +2282,7 @@ checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" [[package]] name = "vaultenator" -version = "0.0.8" +version = "0.0.9" dependencies = [ "cosmwasm-schema", "cosmwasm-std", diff --git a/Cargo.toml b/Cargo.toml index bb4aef7..4fe0b0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" repository = "https://github.com/margined-protocol/vaultenator" resolver = "2" rust-version = "1.76.0" -version = "0.0.8" +version = "0.0.9" [lib] crate-type = ["cdylib", "rlib"] diff --git a/src/state.rs b/src/state.rs index 2c81e03..3225caa 100644 --- a/src/state.rs +++ b/src/state.rs @@ -46,10 +46,10 @@ pub trait ManageState: Serialize + DeserializeOwned + Sized { } fn is_open_and_unpaused(deps: Deps) -> Result<(), ContractError> { - if Self::is_contract_open(deps)? { - return Err(ContractError::IsOpen {}); + if !Self::is_contract_open(deps)? { + return Err(ContractError::NotOpen {}); } - if !Self::is_contract_paused(deps)? { + if Self::is_contract_paused(deps)? { return Err(ContractError::Paused {}); } Ok(())