Skip to content

Commit

Permalink
Fix assert condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cptartur committed May 27, 2024
1 parent 07ca16f commit b40d7fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/governor_wrapper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl GovernorWrapper {
governance_address: Address,
) {
assert!(
env.storage().instance().has(&DataKey::Admin),
!env.storage().instance().has(&DataKey::Admin),
"Contract already initialized"
);

Expand Down Expand Up @@ -99,7 +99,7 @@ fn convert_i256_to_u96(env: &Env, value: &I256) -> i128 {
};

assert!(
i128_value < 0 || i128_value >= 2_i128.pow(96),
i128_value >= 0 && i128_value < 2_i128.pow(96),
"Value too large to fit in u96"
);

Expand Down

0 comments on commit b40d7fa

Please sign in to comment.