whisky_provider/maestro/utils/
account_utils.rs1use whisky_common::models::AccountInfo;
2
3use crate::maestro::models::account::AccountInformation;
4
5pub fn account_information_to_account_info(account_information: AccountInformation) -> AccountInfo {
6 AccountInfo {
7 active: account_information.registered,
8 pool_id: account_information
9 .delegated_pool
10 .unwrap_or(("").to_string()),
11 balance: account_information.total_balance.to_string(),
12 rewards: account_information.rewards_available.to_string(),
13 withdrawals: account_information.total_withdrawn.to_string(),
14 }
15}