Skip to content

Commit

Permalink
Merge pull request #20 from helius-labs/fix/remove-debug-logs
Browse files Browse the repository at this point in the history
fix(global): Remove Debug Logs
  • Loading branch information
0xIchigo authored May 18, 2024
2 parents 7b24e7a + b184ab0 commit 66ebf9c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
2 changes: 0 additions & 2 deletions src/enhanced_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ impl Helius {
"{}v0/transactions?api-key={}",
self.config.endpoints.api, self.config.api_key
);

println!("{}", url);
let parsed_url: Url = Url::parse(&url).expect("Failed to parse URL");

self.rpc_client
Expand Down
7 changes: 0 additions & 7 deletions src/request_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ impl RequestHandler {
}

let response: Response = self.send_request(request_builder).await?;

print!("RESPONSE {:?}", response);

self.handle_response(response).await
}

Expand All @@ -89,10 +86,6 @@ impl RequestHandler {
let path: String = response.url().path().to_string();
let body_text: String = response.text().await.unwrap_or_default();

println!("STATUS {}", status);
println!("PATH {}", path);
println!("BODY {}", body_text);

if status.is_success() {
match serde_json::from_str::<T>(&body_text) {
Ok(data) => Ok(data),
Expand Down
7 changes: 1 addition & 6 deletions src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,9 @@ impl RpcClient {
let base_url: String = format!("{}/?api-key={}", self.config.endpoints.rpc, self.config.api_key);
let url: Url = Url::parse(&base_url).expect("Failed to parse URL");

println!("{}", base_url);
println!("{}", url);

let rpc_request: RpcRequest<R> = RpcRequest::new(method.to_string(), request);
println!("Serialized Request: {:?}", serde_json::to_string(&rpc_request));

let rpc_response: RpcResponse<T> = self.handler.send(Method::POST, url, Some(&rpc_request)).await?;
println!("RPCRESPONSE {:?}", rpc_response.result);

Ok(rpc_response.result)
}

Expand Down
2 changes: 0 additions & 2 deletions src/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ impl Helius {
"{}v0/webhooks/?api-key={}",
self.config.endpoints.api, self.config.api_key
);

let parsed_url: Url = Url::parse(&url).expect("Failed to parse URL");
println!("PARSED URL: {}", parsed_url);

self.rpc_client
.handler
Expand Down

0 comments on commit 66ebf9c

Please sign in to comment.