missing wow enum and price values

This commit is contained in:
julian 2022-09-27 10:27:51 -06:00
parent 26b7306d22
commit 88653f96df
4 changed files with 12 additions and 6 deletions

View file

@ -79,7 +79,7 @@ class PriceAPI {
Map<Coin, Tuple2<Decimal, double>> result = {};
try {
final uri = Uri.parse(
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false");
// final uri = Uri.parse(
// "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero%2Cbitcoin%2Cepic-cash%2Czcoin%2Cdogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");

View file

@ -7,9 +7,9 @@ import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'
as epic;
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as firo;
import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart' as wow;
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart'
as nmc;
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart' as wow;
enum Coin {
bitcoin,
@ -217,6 +217,10 @@ Coin coinFromPrettyName(String name) {
case "tDogecoin":
case "dogecoinTestNet":
return Coin.dogecoinTestNet;
case "Wownero":
case "tWownero":
case "wownero":
return Coin.wownero;
default:
throw ArgumentError.value(
name, "name", "No Coin enum value with that prettyName");
@ -247,6 +251,8 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
return Coin.firoTestNet;
case "tdoge":
return Coin.dogecoinTestNet;
case "wow":
return Coin.wownero;
default:
throw ArgumentError.value(
ticker, "name", "No Coin enum value with that ticker");

View file

@ -209,8 +209,8 @@ class CoinThemeColor {
return monero;
case Coin.namecoin:
return namecoin;
// case Coin.wownero:
// return wownero;
case Coin.wownero:
return wownero;
}
}
}

View file

@ -1422,8 +1422,8 @@ class StackColors extends ThemeExtension<StackColors> {
return _coin.monero;
case Coin.namecoin:
return _coin.namecoin;
// case Coin.wownero:
// return wownero;
case Coin.wownero:
return _coin.wownero;
}
}