Closed kdthomas2121 closed 6 years ago
it is easy to add TRON
1) (Data.swift)
let supportedCoins: [Coin] =
[.BTC, .ETH, .TRX, .XRP, .ADA]
2)(in Money.swift)
enum Coin: String {
case BTC
case ETH
case TRX
case XRP
case ADA
}
extension Coin {
func priceProvider() -> CoinPriceProvider {
switch self {
case .XRP, .TRX, .ADA: return BinancePriceProvider()
default: return CoinbasePriceProvider()
}
}
}
extension Coin {
func unicode() -> String {
switch self {
case .BTC: return "â‚¿"
case .ETH: return "Ξ"
case .TRX: return "Ï„"
case .XRP: return "Ʀ"
case .ADA: return "a̶"
}
}
case .TRX: return NSColor(displayP3Red: 182 / 255, green: 180 / 255, blue: 182 / 255, alpha: 1)
This can be closed, made a fork and managed to add coins myself, thanks!
Some day I'll learn how to add my own!