-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat(multichain): update token-info client #1208
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
pub mod dapp; | ||
pub mod token_info; | ||
pub mod token_info { | ||
pub use contracts_info_proto::{ | ||
blockscout::contracts_info::v1 as proto, | ||
http_client::{contracts_info as endpoints, Client, Config}, | ||
}; | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ use api_client_framework::HttpApiClient; | |
use multichain_aggregator_logic::{ | ||
self as logic, | ||
api_key_manager::ApiKeyManager, | ||
clients::token_info::{SearchTokenInfos, SearchTokenInfosParams}, | ||
clients::token_info::{self, endpoints::SearchTokenInfos, proto::SearchTokenInfosRequest}, | ||
error::ServiceError, | ||
Chain, Token, | ||
}; | ||
|
@@ -27,7 +27,7 @@ pub struct MultichainAggregator { | |
// Cached chains | ||
chains: Vec<Chain>, | ||
dapp_client: HttpApiClient, | ||
token_info_client: HttpApiClient, | ||
token_info_client: token_info::Client, | ||
api_settings: ApiSettings, | ||
} | ||
|
||
|
@@ -36,7 +36,7 @@ impl MultichainAggregator { | |
db: DatabaseConnection, | ||
chains: Vec<Chain>, | ||
dapp_client: HttpApiClient, | ||
token_info_client: HttpApiClient, | ||
token_info_client: token_info::Client, | ||
api_settings: ApiSettings, | ||
) -> Self { | ||
Self { | ||
|
@@ -123,14 +123,12 @@ impl MultichainAggregatorService for MultichainAggregator { | |
|
||
let chain_id = inner.chain_id.map(parse_query).transpose()?; | ||
|
||
let token_info_search_endpoint = SearchTokenInfos { | ||
params: SearchTokenInfosParams { | ||
query: inner.q.to_string(), | ||
chain_id, | ||
page_size: inner.page_size, | ||
page_token: inner.page_token, | ||
}, | ||
}; | ||
let token_info_search_endpoint = SearchTokenInfos::new(SearchTokenInfosRequest { | ||
query: inner.q.to_string(), | ||
chain_id, | ||
page_size: inner.page_size, | ||
page_token: inner.page_token, | ||
}); | ||
Comment on lines
+126
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Implement thorough error handling & boundary checks. Using |
||
|
||
let res = self | ||
.token_info_client | ||
|
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.
Fix the dependency path to resolve build failure.
The pipeline is failing because the
contracts-info-proto
dependency cannot be found at the specified path../contracts-info-proto
. This indicates that either:To resolve this, we need to verify the correct path to the dependency. Please run this script to check the repository structure:
🧰 Tools
🪛 GitHub Actions: Test, lint and docker (multichain-aggregator)
[error] Failed to load manifest for workspace member. Dependency 'contracts-info-proto' could not be found because its Cargo.toml file is missing at '/home/runner/work/blockscout-rs/blockscout-rs/contracts-info-proto/Cargo.toml'