Browse Source

fixed Infinity in native wallet progress bar

master
pbca26 8 years ago
parent
commit
951d49a3c1
  1. 3
      assets/scripts/kmd_wallet_dashboard.js

3
assets/scripts/kmd_wallet_dashboard.js

@ -244,6 +244,9 @@ function KMD_ProgressBar() {
if (getinfotmp.blocks === 0) { if (getinfotmp.blocks === 0) {
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks'); $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks');
$('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' });
} else if (getinfotmp.blocks > 0 && getinfotmp.longestchain === 0) {
$('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No longestchain');
$('#extcoin-progressbars .progress-bar').css({ 'width': '100%' });
} else { } else {
var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10);
//console.log(sync_percent); //console.log(sync_percent);

Loading…
Cancel
Save