Fee box fixes.

This commit is contained in:
softsimon
2020-07-30 13:13:22 +07:00
parent bc92fb669b
commit 67dbea3faf
4 changed files with 16 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
<td class="border-top-0">30 minutes</td>
<td class="border-top-0">Next block</td>
</tr>
<tr *ngIf="(feeEstimations$ | async) as feeEstimations; else loadingFees">
<tr *ngIf="(isLoadingWebSocket$ | async) === false && (feeEstimations$ | async) as feeEstimations; else loadingFees">
<td class="d-none d-md-table-cell">{{ feeEstimations.hourFee }} sat/vB (<app-fiat [value]="feeEstimations.hourFee * 250"></app-fiat>)</td>
<td>{{ feeEstimations.halfHourFee }} sat/vB (<app-fiat [value]="feeEstimations.halfHourFee * 250"></app-fiat>)</td>
<td>{{ feeEstimations.fastestFee }} sat/vB (<app-fiat [value]="feeEstimations.fastestFee * 250"></app-fiat>)</td>

View File

@@ -17,12 +17,14 @@ interface FeeEstimations {
})
export class FeesBoxComponent implements OnInit {
feeEstimations$: Observable<FeeEstimations>;
isLoadingWebSocket$: Observable<boolean>;
constructor(
private stateService: StateService,
) { }
ngOnInit(): void {
this.isLoadingWebSocket$ = this.stateService.isLoadingWebSocket$;
this.feeEstimations$ = this.stateService.mempoolBlocks$
.pipe(
filter((blocks) => !!blocks.length),