From 4b7b347e462850739ea89640a8ad102fffd98492 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Sun, 11 Jun 2017 12:27:58 +0300 Subject: [PATCH] added native sync rescan progress --- .../walletsNativeSyncProgress.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js b/react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js index 4eead7d..2d97a40 100644 --- a/react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js +++ b/react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js @@ -37,7 +37,7 @@ class WalletsNativeSyncProgress extends React.Component { if (this.props.Settings && this.props.Settings.debugLog) { if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1) { - let temp = this.props.Settings.debugLog.split(' '); + const temp = this.props.Settings.debugLog.split(' '); let currentBestChain; let currentProgress; @@ -61,6 +61,18 @@ class WalletsNativeSyncProgress extends React.Component { `: ${Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks)}% (blocks ${currentBestChain} / ${this.props.Dashboard.progress.remoteKMDNode.blocks})` ); } + } else if (this.props.Settings.debugLog.indexOf('Still rescanning') > -1) { + const temp = this.props.Settings.debugLog.split(' '); + + for (let i = 0; i < temp.length; i++) { + if (temp[i].indexOf('Progress=') > -1) { + currentProgress = Number(temp[i].replace('Progress=', '')) * 100; + } + } + + return ( + `: ${currentProgress}%` + ); } else { return ( ...