diff --git a/contracts/cw3-fixed-multisig/src/contract.rs b/contracts/cw3-fixed-multisig/src/contract.rs index 0247a6428..bb9a2b639 100644 --- a/contracts/cw3-fixed-multisig/src/contract.rs +++ b/contracts/cw3-fixed-multisig/src/contract.rs @@ -110,9 +110,11 @@ pub fn handle_propose( // max expires also used as default let max_expires = cfg.max_voting_period.after(&env.block); let mut expires = latest.unwrap_or(max_expires); - // FIXME: partial_cmp() fails when expires is height based, but max_expires is time-based (by example) - if expires.partial_cmp(&max_expires) != Some(Ordering::Less) { + let comp = expires.partial_cmp(&max_expires); + if let Some(Ordering::Greater) = comp { expires = max_expires; + } else if let None = comp { + return Err(StdError::generic_err("Wrong expiration option")); } // create a proposal