mirror of
https://github.com/mempool/mempool.git
synced 2024-12-27 08:44:26 +01:00
Fee box: Handle empty mempool.
This commit is contained in:
parent
9e0097e7b6
commit
266c347292
@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { StateService } from 'src/app/services/state.service';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { map, filter } from 'rxjs/operators';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
interface FeeEstimations {
|
||||
@ -25,6 +25,7 @@ export class FeesBoxComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.feeEstimations$ = this.stateService.mempoolBlocks$
|
||||
.pipe(
|
||||
filter((blocks) => !!blocks.length),
|
||||
map((pBlocks) => {
|
||||
let firstMedianFee = Math.ceil(pBlocks[0].medianFee);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user