-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to v0.11.0 #113
Migrate to v0.11.0 #113
Conversation
I suggest we "cross-review" this quickly once more, before merging it. Or are you OK with merging it directly? |
@@ -754,21 +771,21 @@ mod tests { | |||
// fake a reinvestment (this must be sent by the contract itself) | |||
// after this, we see 1000 issues and 1500 bonded (and a price of 1.5) | |||
let rebond_msg = HandleMsg::_BondAllTokens {}; | |||
let env = mock_env(&contract_addr, &[]); | |||
let info = mock_info(MOCK_CONTRACT_ADDR, &[]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me.
@@ -450,19 +484,20 @@ fn query_all_approvals<S: Storage, A: Api, Q: Querier>( | |||
|
|||
let res: StdResult<Vec<_>> = operators_read(&deps.storage, &owner_raw) | |||
.range(start.as_deref(), None, Order::Ascending) | |||
.filter(|r| include_expired || r.is_err() || !r.as_ref().unwrap().1.is_expired(&env.block)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Including errors just in case... shouldn't happen, but makes sense.
let mut late_env = mock_env(); | ||
late_env.block.height = 1234568; //expired | ||
let res = query_all_approvals(&deps, late_env, "person".into(), false, None, None).unwrap(); | ||
assert_eq!(0, res.operators.len()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. We can add exhaustive test cases later.
Yeah, happy if we both do one more review on this before merging. Looks like you already did I will by Monday |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I will do a bit of cleanup before merge
Closes #96
Making a PR for Mauro, including my work (previously merged) as well.
Updates all contracts to cosmwasm v0.11.0