2024-07-05 16:48:50 +09:00
|
|
|
import { Component, Input, OnInit, OnChanges } from '@angular/core';
|
2024-07-04 16:54:35 +09:00
|
|
|
import { ETA } from '../../services/eta.service';
|
|
|
|
import { Transaction } from '../../interfaces/electrs.interface';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-acceleration-timeline',
|
|
|
|
templateUrl: './acceleration-timeline.component.html',
|
|
|
|
styleUrls: ['./acceleration-timeline.component.scss'],
|
|
|
|
})
|
|
|
|
export class AccelerationTimelineComponent implements OnInit, OnChanges {
|
|
|
|
@Input() transactionTime: number;
|
|
|
|
@Input() tx: Transaction;
|
|
|
|
@Input() eta: ETA;
|
2024-07-05 18:12:28 +09:00
|
|
|
@Input() isAcceleration: boolean;
|
2024-07-04 16:54:35 +09:00
|
|
|
|
|
|
|
acceleratedAt: number;
|
|
|
|
|
2024-07-05 16:48:50 +09:00
|
|
|
constructor() {}
|
2024-07-04 16:54:35 +09:00
|
|
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
this.acceleratedAt = this.tx.acceleratedAt ?? new Date().getTime() / 1000;
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnChanges(changes): void {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|