Skip to content

Commit

Permalink
Fix open and unpaused check (#14)
Browse files Browse the repository at this point in the history
* Fix open and unpaused check

* Fix CHANGELOG links
  • Loading branch information
shapeshed authored Apr 15, 2024
1 parent ea88f3d commit 8af72c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit 8af72c1

Please sign in to comment.