Browse Source

kmd native progress fix 2

all-modes
pbca26 8 years ago
parent
commit
cea040a99b
  1. 20
      react/src/components/dashboard/walletsProgress/walletsProgress.js

20
react/src/components/dashboard/walletsProgress/walletsProgress.js

@ -62,6 +62,7 @@ class WalletsProgress extends React.Component {
_debugLogLine = this.props.Settings.debugLog;
}
if (_debugLogLine) {
const temp = _debugLogLine.split(' ');
let currentBestChain;
let currentProgress;
@ -80,6 +81,7 @@ class WalletsProgress extends React.Component {
currentProgress
];
}
}
renderSyncPercentagePlaceholder() {
// activating best chain
@ -87,7 +89,14 @@ class WalletsProgress extends React.Component {
this.props.Dashboard.progress.code &&
this.props.Dashboard.progress.code === -28 &&
this.props.Settings.debugLog) {
return SyncPercentageRender.call(this, this.parseActivatingBestChainProgress()[1].toFixed(2));
const _progress = this.parseActivatingBestChainProgress();
if (_progress &&
_progress[1]) {
return SyncPercentageRender.call(this, _progress[1].toFixed(2));
} else {
return LoadingBlocksRender.call(this);
}
}
if (this.props.Dashboard.progress &&
@ -167,9 +176,16 @@ class WalletsProgress extends React.Component {
this.props.Dashboard.progress.code &&
this.props.Dashboard.progress.code === -28 &&
this.props.Settings.debugLog) {
const _blocks = this.parseActivatingBestChainProgress();
if (_blocks &&
_blocks[0]) {
return (
`: ${this.parseActivatingBestChainProgress()[0]} (current block)`
`: ${_blocks[0]} (current block)`
);
} else {
return null;
}
} else {
if (currentProgress) {
return (

Loading…
Cancel
Save