mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 05:34:03 +01:00
Fix ETA loading error
This commit is contained in:
parent
14e05b43c7
commit
a0402b92f9
@ -68,7 +68,7 @@
|
||||
<h5 *ngIf="estimate?.pools?.length" i18n="accelerator.how-much-faster">How much faster?</h5>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ng-container *ngIf="(etaInfo$ | async) as etaInfo">
|
||||
<ng-container *ngIf="(etaInfo$ | async) as etaInfo; else loadingEstimate">
|
||||
<small class="form-text text-muted mb-2" i18n="accelerator.hashrate-percentage-description">Your transaction will be prioritized by up to {{ etaInfo.hashratePercentage | number : '1.1-1' }}% of miners.</small>
|
||||
<small class="form-text text-muted mb-2" i18n="accelerator.time-estimate-description">This will reduce your expected waiting time until the first confirmation to <app-time kind="within" [time]="etaInfo.acceleratedETA" [fastRender]="false" [fixedRender]="true"></app-time></small>
|
||||
</ng-container>
|
||||
|
@ -78,6 +78,10 @@ export class TimeComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
calculate() {
|
||||
if (!this.time) {
|
||||
return;
|
||||
}
|
||||
|
||||
let seconds: number;
|
||||
switch (this.kind) {
|
||||
case 'since':
|
||||
|
@ -26,7 +26,7 @@ export class EtaService {
|
||||
|
||||
getProjectedEtaObservable(estimate: AccelerationEstimate, miningStats?: MiningStats): Observable<{ hashratePercentage: number, ETA: number, acceleratedETA: number }> {
|
||||
return combineLatest([
|
||||
this.stateService.mempoolTxPosition$.pipe(map(p => p.position)),
|
||||
this.stateService.mempoolTxPosition$.pipe(map(p => p?.position)),
|
||||
this.stateService.difficultyAdjustment$,
|
||||
miningStats ? of(miningStats) : this.miningService.getMiningStats('1w'),
|
||||
]).pipe(
|
||||
|
Loading…
Reference in New Issue
Block a user