diff --git a/assets/scripts/kmd_wallet_dashboard.js b/assets/scripts/kmd_wallet_dashboard.js index 71d06e2..7e640ea 100644 --- a/assets/scripts/kmd_wallet_dashboard.js +++ b/assets/scripts/kmd_wallet_dashboard.js @@ -241,13 +241,19 @@ function KMD_ProgressBar() { if ( getinfotmp == 'activating') { $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(_lang[defaultLang].INDEX.ACTIVATING + '...'); } else { - var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); - //console.log(sync_percent); - $('div[data-extcoin="' + extcoin + '"][id="extcoin-sync"]').width(parseFloat(sync_percent).toFixed(2) + '%'); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(parseFloat(sync_percent).toFixed(2) + '%'); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-synced-blocks"]').text(getinfotmp.blocks); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-longestchain"]').text(getinfotmp.longestchain); - $('span[data-extcoin="' + extcoin + '"][id="extcoin-connections"]').text(getinfotmp.connections); + if (getinfotmp.blocks === 0) { + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text('No blocks'); + $('#extcoin-progressbars .progress-bar').css({ 'width': '100%' }); + } else { + var sync_percent = parseFloat(parseInt(getinfotmp.blocks, 10) * 100) / parseInt(getinfotmp.longestchain, 10); + //console.log(sync_percent); + console.log('getinfotmp', getinfotmp); + $('div[data-extcoin="' + extcoin + '"][id="extcoin-sync"]').width(parseFloat(sync_percent).toFixed(2) + '%'); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-sync-percent"]').text(parseFloat(sync_percent).toFixed(2) + '%'); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-synced-blocks"]').text(getinfotmp.blocks); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-longestchain"]').text(getinfotmp.longestchain); + $('span[data-extcoin="' + extcoin + '"][id="extcoin-connections"]').text(getinfotmp.connections); + } $('#extcoin-wallet-activating-alert').hide(); } } diff --git a/assets/scripts/sidebar.js b/assets/scripts/sidebar.js index 7e1e6e8..fef516f 100644 --- a/assets/scripts/sidebar.js +++ b/assets/scripts/sidebar.js @@ -474,7 +474,7 @@ function assetchain_pax_menu_actions(coin) { renderAssetGFX('supernet', 'jumblr', coin); break; case 'MVP': - renderAssetGFX('mpv', 'mpv', coin); + renderAssetGFX('mvp', 'mvp', coin); break; case 'KV': renderAssetGFX('supernet', 'jumblr', coin);