Skip to content

Commit db5b518

Browse files
committed
upgrade ic-cdk
1 parent f6d25ff commit db5b518

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/ethereum-json-rpc-client/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ reqwest = ["dep:reqwest"]
1919
http-outcall = ["dep:url"]
2020
# Adds an API method `sanitize_http_response` to the canister and `HttpOutcallClient::new_sanitized` method to use it.
2121
# We feature-gate it because it changes the API of the canister which is not always necessary.
22-
sanitize-http-outcall = ["dep:ic-cdk"]
22+
sanitize-http-outcall = []
2323

2424
[dependencies]
2525
alloy = { workspace = true }
2626
candid = { workspace = true }
2727
did = { workspace = true }
2828
ic-canister-client = { workspace = true, optional = true }
29-
ic-cdk = { workspace = true, optional = true }
3029
ic-exports = { workspace = true }
3130
itertools = { workspace = true }
3231
log = { workspace = true }

src/ethereum-json-rpc-client/src/http_outcall.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ use std::pin::Pin;
33

44
use did::rpc::request::RpcRequest;
55
use did::rpc::response::RpcResponse;
6-
use ic_exports::ic_cdk;
76
use ic_exports::ic_cdk::management_canister::{
87
self, HttpHeader, HttpMethod, HttpRequestArgs, TransformContext,
98
};
10-
#[cfg(feature = "sanitize-http-outcall")]
11-
use ic_exports::ic_cdk::management_canister::{HttpRequestResult, TransformArgs};
12-
139
use crate::{Client, JsonRpcError, JsonRpcResult};
1410

1511
/// EVM client that uses HTTPS Outcalls to communicate with EVM.
@@ -95,10 +91,9 @@ impl HttpOutcallClient {
9591
}
9692

9793
#[cfg(feature = "sanitize-http-outcall")]
98-
#[ic_cdk::query]
99-
fn sanitize_http_response(raw_response: TransformArgs) -> HttpRequestResult {
94+
fn sanitize_http_response(raw_response: ic_exports::ic_cdk::management_canister::TransformArgs) -> ic_exports::ic_cdk::management_canister::HttpRequestResult {
10095
const USE_HEADERS: &[&str] = &["content-encoding", "content-length", "content-type", "host"];
101-
let TransformArgs { mut response, .. } = raw_response;
96+
let ic_exports::ic_cdk::management_canister::TransformArgs { mut response, .. } = raw_response;
10297
response
10398
.headers
10499
.retain(|header| USE_HEADERS.iter().any(|v| v == &header.name.to_lowercase()));
@@ -179,6 +174,7 @@ impl Client for HttpOutcallClient {
179174
#[cfg(feature = "sanitize-http-outcall")]
180175
mod tests {
181176
use candid::Nat;
177+
use ic_exports::ic_cdk::management_canister::{HttpRequestResult, TransformArgs};
182178

183179
use super::*;
184180

0 commit comments

Comments
 (0)