use crate::{domain::wallet::WalletBalance, ApiClient, Int32, Result};
pub async fn balance(client: &ApiClient, char_id: Int32) -> Result<Option<WalletBalance>> {
let res = client
.query_esi(format!("characters/{}/wallet/", char_id))
.await?;
Ok(res.map(|r: f64| Into::<WalletBalance>::into(r)))
}