Exemplo n.º 1
0
        public static string TezToCurrency(this decimal tz, Tezos.MarketData md, UserCurrency currency)
        {
            var code = currency.GetDisplayName();

            return((tz * md.CurrencyRate((Currency)currency))
                   .ToString($"###,###,###,###,##0.00 {code}", CultureInfo.InvariantCulture).Trim());
        }
Exemplo n.º 2
0
 public static string TezToCurrency(this decimal tz, Tezos.MarketData md, User user)
 => tz.TezToCurrency(md, user.Currency);
Exemplo n.º 3
0
 public static string TezToUsd(this decimal tz, Tezos.MarketData md)
 => (tz * md.price_usd).ToString("###,###,###,###,##0.00", CultureInfo.InvariantCulture).Trim();
Exemplo n.º 4
0
 public static string TezToEur(this decimal tz, Tezos.MarketData md)
 => (tz * md.price_eur).ToString("#,###,##0.####", CultureInfo.InvariantCulture).Trim();
Exemplo n.º 5
0
 public static string TezToBtc(this decimal tz, Tezos.MarketData md)
 {
     return((tz * md.price_btc).ToString("#,###,##0.####", CultureInfo.InvariantCulture).Trim());
 }