From b38bf0f7b675c034173e68a36a791864daa988d0 Mon Sep 17 00:00:00 2001 From: natsoni Date: Tue, 9 Jul 2024 01:17:38 +0900 Subject: [PATCH] Hide standard ETA data until proper ETA calculation gets implemented --- .../acceleration-timeline.component.html | 5 +++-- .../acceleration-timeline.component.ts | 20 ++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html index 151181506..b17b7511d 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html @@ -71,7 +71,7 @@
@if (eta) { - ~ ({{ accelerateRatio }}x faster) + ~ }
@@ -105,7 +105,8 @@
- ~ + + -
diff --git a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts index ba687e093..38d48dd05 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts @@ -28,14 +28,16 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges { ngOnChanges(changes): void { this.now = Math.floor(new Date().getTime() / 1000); - if (changes?.eta?.currentValue || changes?.standardETA?.currentValue || changes?.acceleratedETA?.currentValue) { - if (changes?.eta?.currentValue) { - if (changes?.acceleratedETA?.currentValue) { - this.accelerateRatio = Math.floor((Math.floor(changes.eta.currentValue.time / 1000) - this.now) / (Math.floor(changes.acceleratedETA.currentValue / 1000) - this.now)); - } else if (changes?.standardETA?.currentValue) { - this.accelerateRatio = Math.floor((Math.floor(changes.standardETA.currentValue / 1000) - this.now) / (Math.floor(changes.eta.currentValue.time / 1000) - this.now)); - } - } - } + // Hide standard ETA while we don't have a proper standard ETA calculation, see https://github.com/mempool/mempool/issues/65 + + // if (changes?.eta?.currentValue || changes?.standardETA?.currentValue || changes?.acceleratedETA?.currentValue) { + // if (changes?.eta?.currentValue) { + // if (changes?.acceleratedETA?.currentValue) { + // this.accelerateRatio = Math.floor((Math.floor(changes.eta.currentValue.time / 1000) - this.now) / (Math.floor(changes.acceleratedETA.currentValue / 1000) - this.now)); + // } else if (changes?.standardETA?.currentValue) { + // this.accelerateRatio = Math.floor((Math.floor(changes.standardETA.currentValue / 1000) - this.now) / (Math.floor(changes.eta.currentValue.time / 1000) - this.now)); + // } + // } + // } } }