use std::collections::HashMap;
use crate::domain::wallet::Transaction;
use crate::ApiClient;
use crate::Result;
use crate::{Int32, Int64};
pub async fn transactions(client: &ApiClient, char_id: Int32) -> Result<Option<Vec<Transaction>>> {
client
.query_esi(format!("characters/{}/wallet/transactions", char_id))
.await
}
pub async fn transactions_from(
client: &ApiClient,
char_id: Int32,
from: Int64,
) -> Result<Option<Vec<Transaction>>> {
let mut map = HashMap::new();
map.insert("from_id".to_string(), from.to_string());
client
.query_esi_with_params(format!("characters/{}/wallet/transactions/", char_id), map)
.await
}