Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions website_example/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4 class="yourStats">Payments</h4>



/* Market data polling */
/* Market data polling */

var intervalMarketPolling = setInterval(updateMarkets, 300000); //poll market data every 5 minutes
var xhrMarketGets = {};
Expand All @@ -287,7 +287,13 @@ <h4 class="yourStats">Payments</h4>
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;
Expand All @@ -311,7 +317,6 @@ <h4 class="yourStats">Payments</h4>




/* Hash Profitability Calculator */

$('#calcHashRate').keyup(calcEstimateProfit).change(calcEstimateProfit);
Expand Down