diff --git a/src/app/core/services/daemon/daemon-data.service.ts b/src/app/core/services/daemon/daemon-data.service.ts index 584c840..8694192 100644 --- a/src/app/core/services/daemon/daemon-data.service.ts +++ b/src/app/core/services/daemon/daemon-data.service.ts @@ -420,7 +420,7 @@ export class DaemonDataService { await this.refreshMiningStatus(); - await this.refreshMinerData(); + if (this._daemonInfo.synchronized) await this.refreshMinerData(); this._gettingPeerList = true; this._peerList = await this.daemonService.getPeerList(); diff --git a/src/app/pages/blockchain/blockchain.component.ts b/src/app/pages/blockchain/blockchain.component.ts index bf2ce46..09dc6b9 100644 --- a/src/app/pages/blockchain/blockchain.component.ts +++ b/src/app/pages/blockchain/blockchain.component.ts @@ -25,7 +25,14 @@ export class BlockchainComponent implements AfterViewInit { return this.daemonData.lastBlockHeader; } - public getLastBlockError: string = ''; + public get daemonSynchronized(): boolean { + return this.daemonData.info ? this.daemonData.info.synchronized : false; + } + + public get getLastBlockError(): string { + return this.daemonSynchronized ? '' : 'Last block header not available, blockchain is not synchronized'; + } + public block?: Block; public getBlockByHash: boolean = false; public getBlockHash: string = ''; diff --git a/src/app/pages/mining/mining.component.html b/src/app/pages/mining/mining.component.html index 8772392..66dfda7 100644 --- a/src/app/pages/mining/mining.component.html +++ b/src/app/pages/mining/mining.component.html @@ -13,7 +13,14 @@