mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 13:24:01 +01:00
Bugfix: Latestblock height didn't propagate in the template
Renaming Contributors to About
This commit is contained in:
parent
c9cc660e54
commit
7e9ba6b983
@ -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,
|
||||
},
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
<a class="nav-link" [routerLink]="['/assets' | relativeUrl]" (click)="collapse()">Assets</a>
|
||||
</li>
|
||||
<li class="nav-item" routerLinkActive="active">
|
||||
<a class="nav-link" [routerLink]="['/contributors' | relativeUrl]" (click)="collapse()">About</a>
|
||||
<a class="nav-link" [routerLink]="['/about' | relativeUrl]" (click)="collapse()">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
<app-search-form location="top" (searchTriggered)="collapse()"></app-search-form>
|
||||
|
@ -127,7 +127,7 @@
|
||||
</div>
|
||||
|
||||
<div class="float-right">
|
||||
<span *ngIf="showConfirmations && latestBlock">
|
||||
<span *ngIf="showConfirmations && latestBlock$ | async as latestBlock">
|
||||
<button *ngIf="tx.status.confirmed; else unconfirmedButton" type="button" class="btn btn-sm btn-success mt-2">{{ latestBlock.height - tx.status.block_height + 1 }} confirmation<ng-container *ngIf="latestBlock.height - tx.status.block_height + 1 > 1">s</ng-container></button>
|
||||
<ng-template #unconfirmedButton>
|
||||
<button type="button" class="btn btn-sm btn-danger mt-2">Unconfirmed</button>
|
||||
|
@ -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<Block>;
|
||||
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') {
|
||||
|
Loading…
Reference in New Issue
Block a user