diff --git a/website_example/pages/home.html b/website_example/pages/home.html index 17b9c1354..9fcffeaba 100644 --- a/website_example/pages/home.html +++ b/website_example/pages/home.html @@ -277,7 +277,7 @@

Payments

- /* Market data polling */ +/* Market data polling */ var intervalMarketPolling = setInterval(updateMarkets, 300000); //poll market data every 5 minutes var xhrMarketGets = {}; @@ -287,7 +287,13 @@

Payments

var marketsData = []; for (var i = 0; i < cryptonatorWidget.length; i++){ (function(i){ - xhrMarketGets[cryptonatorWidget[i]] = $.get('https://www.cryptonator.com/api/ticker/' + cryptonatorWidget[i], function(data){ + cryptonatorWidget[i] = cryptonatorWidget[i].replace('{symbol}', lastStats.config.symbol.toLowerCase()); + xhrMarketGets[cryptonatorWidget[i]] = $.get('https://api.cryptonator.com/api/ticker/' + cryptonatorWidget[i], function(data){ + if(data.error) { + return; + } + $('.marketRate').show(); + marketsData[i] = data; completedFetches++; if (completedFetches !== cryptonatorWidget.length) return; @@ -311,7 +317,6 @@

Payments

- /* Hash Profitability Calculator */ $('#calcHashRate').keyup(calcEstimateProfit).change(calcEstimateProfit);