From 7e9ba6b98381e71e95a11b93b3ede2cf06eb5eaa Mon Sep 17 00:00:00 2001 From: softsimon Date: Sun, 21 Jun 2020 14:55:16 +0700 Subject: [PATCH] Bugfix: Latestblock height didn't propagate in the template Renaming Contributors to About --- frontend/src/app/app-routing.module.ts | 8 ++++---- .../app/components/master-page/master-page.component.html | 2 +- .../transactions-list/transactions-list.component.html | 2 +- .../transactions-list/transactions-list.component.ts | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 96f5aa61f..3a2c1d62e 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -45,7 +45,7 @@ const routes: Routes = [ component: StatisticsComponent, }, { - path: 'contributors', + path: 'about', component: AboutComponent, }, { @@ -98,7 +98,7 @@ const routes: Routes = [ component: TelevisionComponent, }, { - path: 'contributors', + path: 'about', component: AboutComponent, }, { @@ -151,7 +151,7 @@ const routes: Routes = [ component: StatisticsComponent, }, { - path: 'contributors', + path: 'about', component: AboutComponent, }, { @@ -204,7 +204,7 @@ const routes: Routes = [ component: StatisticsComponent, }, { - path: 'contributors', + path: 'about', component: AboutComponent, }, { diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html index 553130a12..022acd7ae 100644 --- a/frontend/src/app/components/master-page/master-page.component.html +++ b/frontend/src/app/components/master-page/master-page.component.html @@ -33,7 +33,7 @@ Assets diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html index 6c3a0d579..e70d23461 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -127,7 +127,7 @@
- + diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.ts b/frontend/src/app/components/transactions-list/transactions-list.component.ts index 2fc0fbe67..cf2546c8d 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.ts +++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts @@ -5,6 +5,7 @@ import { Block, Outspend, Transaction } from '../../interfaces/electrs.interface import { ElectrsApiService } from '../../services/electrs-api.service'; import { environment } from 'src/environments/environment'; import { AssetsService } from 'src/app/services/assets.service'; +import { map } from 'rxjs/operators'; @Component({ selector: 'app-transactions-list', @@ -22,7 +23,7 @@ export class TransactionsListComponent implements OnInit, OnChanges { @Output() loadMore = new EventEmitter(); - latestBlock: Block; + latestBlock$: Observable; outspends: Outspend[] = []; assetsMinimal: any; @@ -34,7 +35,7 @@ export class TransactionsListComponent implements OnInit, OnChanges { ) { } ngOnInit() { - this.stateService.blocks$.subscribe(([block]) => this.latestBlock = block); + this.latestBlock$ = this.stateService.blocks$.pipe(map(([block]) => block)); this.stateService.networkChanged$.subscribe((network) => this.network = network); if (this.network === 'liquid') {