@@ -46,7 +46,7 @@ use crate::{
4646} ;
4747use crate :: { Attribute , DenomMetadata } ;
4848#[ cfg( feature = "stargate" ) ]
49- use crate :: { ChannelResponse , IbcQuery , ListChannelsResponse , PortIdResponse } ;
49+ use crate :: { ChannelResponse , IbcQuery , PortIdResponse } ;
5050#[ cfg( feature = "cosmwasm_1_4" ) ]
5151use crate :: { Decimal256 , DelegationRewardsResponse , DelegatorValidatorsResponse } ;
5252use crate :: { RecoverPubkeyError , StdError , StdResult , SystemError , VerificationError } ;
@@ -1102,20 +1102,6 @@ impl IbcQuerier {
11021102 let res = ChannelResponse { channel } ;
11031103 to_json_binary ( & res) . into ( )
11041104 }
1105- #[ allow( deprecated) ]
1106- IbcQuery :: ListChannels { port_id } => {
1107- let channels = self
1108- . channels
1109- . iter ( )
1110- . filter ( |c| match port_id {
1111- Some ( p) => c. endpoint . port_id . eq ( p) ,
1112- None => c. endpoint . port_id == self . port_id ,
1113- } )
1114- . cloned ( )
1115- . collect ( ) ;
1116- let res = ListChannelsResponse { channels } ;
1117- to_json_binary ( & res) . into ( )
1118- }
11191105 IbcQuery :: PortId { } => {
11201106 let res = PortIdResponse {
11211107 port_id : self . port_id . clone ( ) ,
@@ -2434,40 +2420,6 @@ mod tests {
24342420 assert_eq ! ( chan. channel, None ) ;
24352421 }
24362422
2437- #[ cfg( feature = "stargate" ) ]
2438- #[ test]
2439- #[ allow( deprecated) ]
2440- fn ibc_querier_channels_matching ( ) {
2441- let chan1 = mock_ibc_channel ( "channel-0" , IbcOrder :: Ordered , "ibc" ) ;
2442- let chan2 = mock_ibc_channel ( "channel-1" , IbcOrder :: Ordered , "ibc" ) ;
2443-
2444- let ibc = IbcQuerier :: new ( "myport" , & [ chan1. clone ( ) , chan2. clone ( ) ] ) ;
2445-
2446- // query channels matching "my_port" (should match both above)
2447- let query = & IbcQuery :: ListChannels {
2448- port_id : Some ( "my_port" . to_string ( ) ) ,
2449- } ;
2450- let raw = ibc. query ( query) . unwrap ( ) . unwrap ( ) ;
2451- let res: ListChannelsResponse = from_json ( raw) . unwrap ( ) ;
2452- assert_eq ! ( res. channels, vec![ chan1, chan2] ) ;
2453- }
2454-
2455- #[ cfg( feature = "stargate" ) ]
2456- #[ test]
2457- #[ allow( deprecated) ]
2458- fn ibc_querier_channels_no_matching ( ) {
2459- let chan1 = mock_ibc_channel ( "channel-0" , IbcOrder :: Ordered , "ibc" ) ;
2460- let chan2 = mock_ibc_channel ( "channel-1" , IbcOrder :: Ordered , "ibc" ) ;
2461-
2462- let ibc = IbcQuerier :: new ( "myport" , & [ chan1, chan2] ) ;
2463-
2464- // query channels matching "myport" (should be none)
2465- let query = & IbcQuery :: ListChannels { port_id : None } ;
2466- let raw = ibc. query ( query) . unwrap ( ) . unwrap ( ) ;
2467- let res: ListChannelsResponse = from_json ( raw) . unwrap ( ) ;
2468- assert_eq ! ( res. channels, vec![ ] ) ;
2469- }
2470-
24712423 #[ cfg( feature = "stargate" ) ]
24722424 #[ test]
24732425 fn ibc_querier_port ( ) {
0 commit comments