From 602e1294f0cf8ee0e6c7bc6b65f874bd2b47135b Mon Sep 17 00:00:00 2001 From: Satinder Grewal Date: Thu, 1 Sep 2016 00:36:59 +1200 Subject: [PATCH] progress bar conditions update --- assets/scripts/dashboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/scripts/dashboard.js b/assets/scripts/dashboard.js index 70fb35b..62925da 100644 --- a/assets/scripts/dashboard.js +++ b/assets/scripts/dashboard.js @@ -538,8 +538,8 @@ function ShowCoinProgressBar(coin) { if (typeof CoinInfoData.bundles == 'undefined') { //console.log(coin+' is undefined'); } else { - if ( parseFloat(CoinInfoData.bundles) < 99 || parseFloat(CoinInfoData.utxo) < 99 || parseFloat(CoinInfoData.balances) < 99 || parseFloat(CoinInfoData.validated) < 99 ) { - //console.log(coin+' is less than 99% complete.'); + if ( parseInt(CoinInfoData.longestchain-1) != parseInt(CoinInfoData.blocks) ) { + //console.log(coin+' is less than 99.98% complete.'); console.log(coin+': '+CoinInfoData.bundles); $('div[data-currency="'+coin+'"][id="currency-progressbars"]').show(); $('div[data-currency="'+coin+'"][id="currency-bundles"]').width(parseFloat(CoinInfoData.bundles).toFixed(2)+'%'); @@ -551,7 +551,7 @@ function ShowCoinProgressBar(coin) { $('div[data-currency="'+coin+'"][id="currency-validated"]').width(parseFloat(CoinInfoData.validated).toFixed(2)+'%'); $('span[data-currency="'+coin+'"][id="currency-validated-percent"]').text(parseFloat(CoinInfoData.validated).toFixed(2)+'%'); } - if ( parseFloat(CoinInfoData.bundles) > 99 || parseFloat(CoinInfoData.utxo) > 99 || parseFloat(CoinInfoData.balances) > 99 || parseFloat(CoinInfoData.validated) > 99 ) { + if ( parseInt(CoinInfoData.longestchain-1) == parseInt(CoinInfoData.blocks) ) { $('div[data-currency="'+coin+'"][id="currency-progressbars"]').hide(); } }