You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { Component, AfterContentChecked, Input } from '@angular/core';
|
|
|
|
|
|
|
|
import { FeeRates, FeeRatePerObj, feeRateStyle } from '../../../shared/models/clnModels';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'rtl-cln-fee-rates',
|
|
|
|
templateUrl: './fee-rates.component.html',
|
|
|
|
styleUrls: ['./fee-rates.component.scss']
|
|
|
|
})
|
|
|
|
export class CLNFeeRatesComponent implements AfterContentChecked {
|
|
|
|
|
|
|
|
@Input() feeRateStyle: string;
|
|
|
|
@Input() feeRates: FeeRates;
|
|
|
|
@Input() errorMessage: string;
|
|
|
|
perkbw: FeeRatePerObj = {};
|
|
|
|
|
|
|
|
constructor() { }
|
|
|
|
|
|
|
|
ngAfterContentChecked() {
|
|
|
|
if (this.feeRateStyle === feeRateStyle.KB) {
|
|
|
|
this.perkbw = this.feeRates.perkb;
|
|
|
|
} else if (this.feeRateStyle === feeRateStyle.KW) {
|
|
|
|
this.perkbw = this.feeRates.perkw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|