Skip to content
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

IBC Querier follow-ups #1624

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to

## [Unreleased]

### Added

- cosmwasm-std: Add an IBC querier implementation to `testing::MockQuerier`
([#1620], [#1624]).

[#1620]: https://github.com/CosmWasm/cosmwasm/pull/1620
[#1624]: https://github.com/CosmWasm/cosmwasm/pull/1624

### Fixed

- all: Fix `backtraces` feature for newer versions of Rust. This still requires
Expand Down
6 changes: 3 additions & 3 deletions packages/std/src/testing/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1.clone(), chan2.clone()]);

// query channels matching "my_port" (should match both above)
let query = &&IbcQuery::ListChannels {
let query = &IbcQuery::ListChannels {
port_id: Some("my_port".to_string()),
};
let raw = ibc.query(query).unwrap().unwrap();
Expand All @@ -1354,7 +1354,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1, chan2]);

// query channels matching "myport" (should be none)
let query = &&IbcQuery::ListChannels { port_id: None };
let query = &IbcQuery::ListChannels { port_id: None };
let raw = ibc.query(query).unwrap().unwrap();
let res: ListChannelsResponse = from_binary(&raw).unwrap();
assert_eq!(res.channels, vec![]);
Expand All @@ -1368,7 +1368,7 @@ mod tests {
let ibc = IbcQuerier::new("myport", &[chan1]);

// query channels matching "myport" (should be none)
let query = &&IbcQuery::PortId {};
let query = &IbcQuery::PortId {};
let raw = ibc.query(query).unwrap().unwrap();
let res: PortIdResponse = from_binary(&raw).unwrap();
assert_eq!(res.port_id, "myport");
Expand Down