mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
Merge pull request #573 from cypherstack/handle-price_change_percentage_24h-being-null
Handle price_change_percentage_24h being null and not able to parse a…
This commit is contained in:
commit
f032db9a6b
1 changed files with 2 additions and 2 deletions
|
@ -115,8 +115,8 @@ class PriceAPI {
|
|||
final coin = coinFromPrettyName(coinName);
|
||||
|
||||
final price = Decimal.parse(map["current_price"].toString());
|
||||
final change24h =
|
||||
double.parse(map["price_change_percentage_24h"].toString());
|
||||
final change24h = map["price_change_percentage_24h"] != null ?
|
||||
double.parse(map["price_change_percentage_24h"].toString()) : 0.0;
|
||||
|
||||
result[coin] = Tuple2(price, change24h);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue