Merge pull request #48 from marcdeb1/fix_mining_chart

Fix mining chart
This commit is contained in:
Niko 2019-01-03 00:37:29 +01:00 committed by GitHub
commit 07d937d0ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,6 @@ function buildChartData(blockData) {
inflationRate = ((supply - lastYearSupply) / lastYearSupply) * 100;
if(i % skip == 0) { // Only push 1/<skip> of all blocks to optimize data loading
chartData.push({
date: new Date(blockTime * 1000),
date: new Date(blockTime * 1000),
AvailableSupply: supply,
RewardLBC: reward,
@ -99,7 +98,7 @@ function buildChartData(blockData) {
function loadChartData() {
var api_url = "https://chainquery.lbry.io/api/sql?query=";
var query = "SELECT id, block_time FROM block";
var query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height";
var url = api_url + query;
var loadProgress = $('.mining-inflation-chart-container .load-progress');
$.ajax({