fix
This commit is contained in:
@@ -24,8 +24,6 @@ pub struct RpcResponse {
|
||||
}
|
||||
|
||||
pub async fn get_tip_accounts(block_engine_url: &str) -> Result<RpcResponse> {
|
||||
println!("get_tip_accounts: {}", block_engine_url);
|
||||
|
||||
let client_builder = reqwest::Client::builder();
|
||||
let client = client_builder.build()?;
|
||||
let request_body = RpcRequest {
|
||||
@@ -43,7 +41,6 @@ pub async fn get_tip_accounts(block_engine_url: &str) -> Result<RpcResponse> {
|
||||
.json::<RpcResponse>()
|
||||
.await?;
|
||||
|
||||
println!("result: {:?}", result);
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -103,15 +103,12 @@ impl JitoClient {
|
||||
};
|
||||
|
||||
let result = self.send_request(&endpoint, "getTipAccounts", None).await?;
|
||||
println!("get_tip_accounts result: {:?}", serde_json::to_string_pretty(&result).unwrap());
|
||||
let tip_accounts = TipAccountResult::from(result).map_err(|e| anyhow!(e))?;
|
||||
Ok(tip_accounts)
|
||||
}
|
||||
|
||||
async fn send_request(&self, endpoint: &str, method: &str, params: Option<Value>) -> Result<Value> {
|
||||
let url = format!("{}{}", self.base_url, endpoint);
|
||||
println!("send_request url: {:?}", url);
|
||||
|
||||
let url = format!("{}{}", self.base_url, endpoint);
|
||||
let data = json!({
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
|
||||
Reference in New Issue
Block a user