diff --git a/src/app/pages/detail/detail.component.ts b/src/app/pages/detail/detail.component.ts index 2cf0775..4513b43 100644 --- a/src/app/pages/detail/detail.component.ts +++ b/src/app/pages/detail/detail.component.ts @@ -139,7 +139,7 @@ export class DetailComponent implements AfterViewInit, OnDestroy { this.cards = this.createCards(); - this.subscriptions.push(this.daemonData.syncStart.subscribe((info) => { + const syncStartSub: Subscription = this.daemonData.syncStart.subscribe((info) => { if(!info.first) { return; } @@ -147,14 +147,15 @@ export class DetailComponent implements AfterViewInit, OnDestroy { this.ngZone.run(() => { this.cards = this.createCards(); }); + }); - })); - - this.subscriptions.push(this.daemonData.syncInfoRefreshEnd.subscribe(() => { + const syncInfoRefreshEndSub: Subscription = this.daemonData.syncInfoRefreshEnd.subscribe(() => { this.refreshTables(); this.cards = this.createCards(); - })); + }); + + this.subscriptions.push(syncStartSub, syncInfoRefreshEndSub); } diff --git a/src/app/pages/network/network.component.ts b/src/app/pages/network/network.component.ts index a9bb59f..cfe89aa 100644 --- a/src/app/pages/network/network.component.ts +++ b/src/app/pages/network/network.component.ts @@ -41,13 +41,15 @@ export class NetworkComponent implements AfterViewInit, OnDestroy { new NavbarLink('pills-limits-tab', '#pills-limit', 'pills-limit', false, 'Limit') ]; - this.subscriptions.push(this.daemonData.netStatsRefreshEnd.subscribe(() => { + const netStatsRefreshStartSub: Subscription = this.daemonData.netStatsRefreshEnd.subscribe(() => { this.refreshNetStatsHistory(); - })); + }); - this.subscriptions.push(this.daemonData.syncEnd.subscribe(() => { + const syncEndSub: Subscription = this.daemonData.syncEnd.subscribe(() => { this.loadConnectionsTable(); - })); + }); + + this.subscriptions.push(netStatsRefreshStartSub, syncEndSub); this.daemonService.onDaemonStatusChanged.subscribe((running: boolean) => { if (!running) { diff --git a/src/app/pages/peers/peers.component.ts b/src/app/pages/peers/peers.component.ts index 98640e3..02a68de 100644 --- a/src/app/pages/peers/peers.component.ts +++ b/src/app/pages/peers/peers.component.ts @@ -66,7 +66,7 @@ export class PeersComponent implements AfterViewInit, OnDestroy { $publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes); $peerListTable.bootstrapTable('load', this.daemonData.peerList); - const sub = this.daemonData.syncEnd.subscribe(() => { + const sub: Subscription = this.daemonData.syncEnd.subscribe(() => { $publicNodesTable.bootstrapTable('load', this.daemonData.publicNodes); //$peerListTable.bootstrapTable('load', this.daemonData.peerList); }); diff --git a/src/app/pages/transactions/transactions.component.ts b/src/app/pages/transactions/transactions.component.ts index 5b9bf48..4e03708 100644 --- a/src/app/pages/transactions/transactions.component.ts +++ b/src/app/pages/transactions/transactions.component.ts @@ -100,9 +100,10 @@ export class TransactionsComponent implements AfterViewInit, OnDestroy { this.navbarService.setLinks(this.navbarLinks); this.initTables(); - this.subscriptions.push(this.daemonData.syncEnd.subscribe(() => { - this.refreshTables(); - })); + + const onSyncEndSub: Subscription = this.daemonData.syncEnd.subscribe(() => this.refreshTables()); + + this.subscriptions.push(onSyncEndSub); }); }