mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 17:24:25 +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 { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
|
||||||
import { StateService } from 'src/app/services/state.service';
|
import { StateService } from 'src/app/services/state.service';
|
||||||
import { map } from 'rxjs/operators';
|
import { map, filter } from 'rxjs/operators';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
interface FeeEstimations {
|
interface FeeEstimations {
|
||||||
@ -25,6 +25,7 @@ export class FeesBoxComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.feeEstimations$ = this.stateService.mempoolBlocks$
|
this.feeEstimations$ = this.stateService.mempoolBlocks$
|
||||||
.pipe(
|
.pipe(
|
||||||
|
filter((blocks) => !!blocks.length),
|
||||||
map((pBlocks) => {
|
map((pBlocks) => {
|
||||||
let firstMedianFee = Math.ceil(pBlocks[0].medianFee);
|
let firstMedianFee = Math.ceil(pBlocks[0].medianFee);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user