This commit is contained in:
William
2025-02-13 00:08:14 +08:00
parent 705200e538
commit d75b368e5e
3 changed files with 3 additions and 9 deletions
+1 -4
View File
@@ -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,