//
//  WalletInfo.swift

//
//  Created by Leon on 2025/9/15.
//

class WalletInfo: Codable{
    var withdrawable: Int?
    var awaitingIncome: Int?
    var income: Int?
    var requestWithdraw: Int?
    var balance: Int?
    var wdFeeRate: Double?
    
    /*
     {
         "withdrawable" : 0,
         "awaitingIncome" : 2,
         "income" : 2,
         "requestWithdraw" : 0,
         "balance" : 9999999999,
         "wdFeeRate" : 0.20000000000000001
       }
     */
    
    func displayBalance() -> String{
        let balanceCoin = Coin(cents: balance ?? 0)
        return balanceCoin.thousandthsFormatted
    }
    
}
