Fixed parsing of fiat price

This commit is contained in:
M 2020-01-10 18:11:14 +02:00
parent 9b76880e82
commit 8538144c2e

View file

@ -21,7 +21,7 @@ Future<double> fetchPriceFor({CryptoCurrency crypto, FiatCurrency fiat}) async {
} }
final responseJSON = json.decode(response.body) as Map<String, dynamic>; final responseJSON = json.decode(response.body) as Map<String, dynamic>;
final data = responseJSON['data'] as List<Map<String, dynamic>>; final data = responseJSON['data'] as List<dynamic>;
for (final item in data) { for (final item in data) {
if (item['symbol'] == cryptoToString(crypto)) { if (item['symbol'] == cryptoToString(crypto)) {