Transition new blocks from the mempool onto the blockchain.
Chime on new blocks. fixes #47 fixes #84
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
|
||||
<div class="float-right">
|
||||
<span *ngIf="showConfirmations && latestBlock$ | async as latestBlock">
|
||||
<span *ngIf="showConfirmations && 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>
|
||||
|
||||
@@ -22,7 +22,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
|
||||
@Output() loadMore = new EventEmitter();
|
||||
|
||||
latestBlock$: Observable<Block>;
|
||||
latestBlock: Block;
|
||||
outspends: Outspend[] = [];
|
||||
assetsMinimal: any;
|
||||
|
||||
@@ -34,7 +34,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.latestBlock$ = this.stateService.blocks$;
|
||||
this.stateService.blocks$.subscribe(([block]) => this.latestBlock = block);
|
||||
this.stateService.networkChanged$.subscribe((network) => this.network = network);
|
||||
|
||||
if (this.network === 'liquid') {
|
||||
|
||||
Reference in New Issue
Block a user