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

Return full ChannelInfo on Ibc ListChannels query #824

Merged
merged 2 commits into from
Mar 9, 2021
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
2 changes: 1 addition & 1 deletion contracts/reflect/schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
}
},
{
"description": "Lists all (portID, channelID) pairs that are bound to a given port If port_id is omitted, list all channels bound to the contract's port. Returns ListChannelsResponse.",
"description": "Lists all channels that are bound to a given port. If `port_id` is omitted, this list all channels bound to the contract's port. Returns a `ListChannelsResponse`.",
"type": "object",
"required": [
"list_channels"
Expand Down
8 changes: 4 additions & 4 deletions packages/std/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ pub enum IbcQuery {
/// Gets the Port ID the current contract is bound to.
/// Returns PortIdResponse
PortId {},
/// Lists all (portID, channelID) pairs that are bound to a given port
/// If port_id is omitted, list all channels bound to the contract's port.
/// Returns ListChannelsResponse.
/// Lists all channels that are bound to a given port.
/// If `port_id` is omitted, this list all channels bound to the contract's port.
/// Returns a `ListChannelsResponse`.
ListChannels { port_id: Option<String> },
/// Lists all information for a (portID, channelID) pair.
/// If port_id is omitted, it will default to the contract's own channel.
Expand All @@ -89,7 +89,7 @@ pub struct PortIdResponse {

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ListChannelsResponse {
pub channels: Vec<IbcEndpoint>,
pub channels: Vec<IbcChannel>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update

Lists all (portID, channelID) pairs that are bound to a given port

from IbcQuery::ListChannels accordingly?

}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
Expand Down