예제 #1
0
        public static AssetBalance ToBalance(jsonBalance Balance)
        {
            AssetBalance tmp = new AssetBalance {
                Account_ID  = Balance.account_id,
                Asset       = Balance.asset,
                Balance     = decimal.Parse(Balance.balance, System.Globalization.NumberFormatInfo.InvariantInfo),
                Name        = Balance.name,
                Reserved    = decimal.Parse(Balance.reserved, System.Globalization.NumberFormatInfo.InvariantInfo),
                Unconfirmed = decimal.Parse(Balance.unconfirmed, System.Globalization.NumberFormatInfo.InvariantInfo)
            };

            return(tmp);
        }
예제 #2
0
        public static jsonBalance FromBalance(AssetBalance Balance)
        {
            jsonBalance tmp = new jsonBalance {
                account_id  = Balance.Account_ID,
                asset       = Balance.Asset,
                balance     = Balance.Balance.ToString(System.Globalization.NumberFormatInfo.InvariantInfo),
                name        = Balance.Name,
                reserved    = Balance.Reserved.ToString(System.Globalization.NumberFormatInfo.InvariantInfo),
                unconfirmed = Balance.Unconfirmed.ToString(System.Globalization.NumberFormatInfo.InvariantInfo)
            };

            return(tmp);
        }
예제 #3
0
 public static AssetBalance FromJsonBalance(jsonBalance Balance)
 {
     return(Balance.ToBalance());
 }