mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
fix: banano price
This commit is contained in:
parent
80ba2a8c5c
commit
1d2d01d1de
2 changed files with 10 additions and 9 deletions
|
@ -100,7 +100,7 @@ class PriceAPI {
|
|||
Uri.parse("https://api.coingecko.com/api/v3/coins/markets?vs_currency"
|
||||
"=${baseCurrency.toLowerCase()}"
|
||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false");
|
||||
|
||||
final coinGeckoResponse = await client.get(
|
||||
|
@ -115,8 +115,9 @@ class PriceAPI {
|
|||
final coin = coinFromPrettyName(coinName);
|
||||
|
||||
final price = Decimal.parse(map["current_price"].toString());
|
||||
final change24h = map["price_change_percentage_24h"] != null ?
|
||||
double.parse(map["price_change_percentage_24h"].toString()) : 0.0;
|
||||
final change24h = map["price_change_percentage_24h"] != null
|
||||
? double.parse(map["price_change_percentage_24h"].toString())
|
||||
: 0.0;
|
||||
|
||||
result[coin] = Tuple2(price, change24h);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
||||
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,bitcoin-cash"
|
||||
",namecoin,wownero,ethereum,particl,nano,ban&order=market_cap_desc&per_page=50"
|
||||
",namecoin,wownero,ethereum,particl,nano,banano&order=market_cap_desc&per_page=50"
|
||||
"&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -125,7 +125,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false",
|
||||
),
|
||||
headers: {'Content-Type': 'application/json'})).called(1);
|
||||
|
@ -140,7 +140,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&"
|
||||
"ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -244,7 +244,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids"
|
||||
"=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false"),
|
||||
headers: {'Content-Type': 'application/json'})).called(1);
|
||||
|
||||
|
@ -258,7 +258,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -361,7 +361,7 @@ void main() {
|
|||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc"
|
||||
"&ids=monero,bitcoin,litecoin,ecash,epic-cash,zcoin,dogecoin,"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,ban"
|
||||
"bitcoin-cash,namecoin,wownero,ethereum,particl,nano,banano"
|
||||
"&order=market_cap_desc&per_page=50&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
|
Loading…
Reference in a new issue