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 34d0b9556..9f45afb6e 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.html @@ -28,9 +28,6 @@
-
Mined
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 df4de1f20..c8dbed72b 100644 --- a/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts +++ b/frontend/src/app/components/acceleration-timeline/acceleration-timeline.component.ts @@ -20,6 +20,7 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges { now: number; accelerateRatio: number; useAbsoluteTime: boolean = false; + interval: number; constructor() {} @@ -28,7 +29,7 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges { this.now = Math.floor(new Date().getTime() / 1000); this.useAbsoluteTime = this.tx.status.block_time < this.now - 7 * 24 * 3600; - window.setInterval(() => { + this.interval = window.setInterval(() => { this.now = Math.floor(new Date().getTime() / 1000); this.useAbsoluteTime = this.tx.status.block_time < this.now - 7 * 24 * 3600; }, 60000); @@ -47,4 +48,8 @@ export class AccelerationTimelineComponent implements OnInit, OnChanges { // } // } } + + ngOnDestroy(): void { + clearInterval(this.interval); + } }