diff --git a/contracts/neutron_interchain_queries/src/testing/mock_querier.rs b/contracts/neutron_interchain_queries/src/testing/mock_querier.rs index 8447073..5335288 100644 --- a/contracts/neutron_interchain_queries/src/testing/mock_querier.rs +++ b/contracts/neutron_interchain_queries/src/testing/mock_querier.rs @@ -17,12 +17,11 @@ use std::marker::PhantomData; use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage}; use cosmwasm_std::{ - from_json, Binary, Coin, ContractResult, CustomQuery, FullDelegation, GrpcQuery, OwnedDeps, - Querier, QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, Validator, + from_json, Binary, Coin, ContractResult, CustomQuery, GrpcQuery, OwnedDeps, Querier, + QuerierResult, QueryRequest, SystemError, SystemResult, Uint128, }; use neutron_std::types::neutron::interchainqueries::{ - QueryRegisteredQueriesRequest, QueryRegisteredQueryRequest, QueryRegisteredQueryResultRequest, - QueryRegisteredQueryResultResponse, QueryResult, + QueryRegisteredQueryRequest, QueryRegisteredQueryResultRequest, }; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -77,26 +76,21 @@ impl WasmMockQuerier { match &request { QueryRequest::Grpc(GrpcQuery { path, data }) => { let quoted_path = path.trim_matches('"').to_string(); - if quoted_path == "/neutron.interchainqueries.Query/QueryResult".to_string() { + if "ed_path == "/neutron.interchainqueries.Query/QueryResult" { let request: QueryRegisteredQueryResultRequest = ::prost::Message::decode(&data[..]).unwrap(); SystemResult::Ok(ContractResult::Ok( (*self.query_responses.get(&request.query_id).unwrap()).clone(), )) - } else if quoted_path - == "/neutron.interchainqueries.Query/RegisteredQuery".to_string() - { + } else if "ed_path == "/neutron.interchainqueries.Query/RegisteredQuery" { let request: QueryRegisteredQueryRequest = ::prost::Message::decode(&data[..]).unwrap(); SystemResult::Ok(ContractResult::Ok( (*self.registered_queries.get(&request.query_id).unwrap()).clone(), )) - } else if quoted_path == QueryRegisteredQueriesRequest::TYPE_URL.to_string() { - todo!() } else { println!("PATH: {}", quoted_path); - println!("SHOULD BE: {}", QueryRegisteredQueryRequest::TYPE_URL); - self.base.handle_query(&request) + self.base.handle_query(request) } } _ => self.base.handle_query(request),