2023-06-15 15:16:49 -04:00
|
|
|
import { Component, Input, OnInit } from '@angular/core';
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
import { StateService } from '../../../services/state.service';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-fee-rate',
|
|
|
|
|
templateUrl: './fee-rate.component.html',
|
|
|
|
|
styleUrls: ['./fee-rate.component.scss']
|
|
|
|
|
})
|
|
|
|
|
export class FeeRateComponent implements OnInit {
|
|
|
|
|
@Input() fee: number;
|
|
|
|
|
@Input() weight: number = 4;
|
|
|
|
|
@Input() rounding: string = null;
|
|
|
|
|
@Input() showUnit: boolean = true;
|
|
|
|
|
@Input() unitClass: string = 'symbol';
|
2023-06-15 15:17:32 -04:00
|
|
|
@Input() unitStyle: any;
|
2023-06-15 15:16:49 -04:00
|
|
|
|
|
|
|
|
rateUnits$: Observable<string>;
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
private stateService: StateService,
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
this.rateUnits$ = this.stateService.rateUnits$;
|
|
|
|
|
}
|
|
|
|
|
}
|