Commit 8ade33b4 authored by dev0tion's avatar dev0tion

Temp fix for divide by 0

parent dade5002
......@@ -41,6 +41,11 @@ export class StatusBarComponent implements OnInit {
this.lastBlockSyncedHeight = generalWalletInfoResponse.lastBlockSyncedHeight;
this.chainTip = generalWalletInfoResponse.chainTip;
this.connectedNodes = generalWalletInfoResponse.connectedNodes;
if (this.chainTip === 0) {
this.chainTip = 1;
}
this.percentSyncedNumber = ((this.lastBlockSyncedHeight / this.chainTip) * 100);
if (this.percentSyncedNumber.toFixed(0) === "100" && this.lastBlockSyncedHeight != this.chainTip) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment