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.
RTL/src/app/cln/network-info/fee-rates/fee-rates.component.ts

29 lines
816 B
TypeScript

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 = {};
displayedColumns: string[] = ['blockcount', 'feerate'];
constructor() { }
ngAfterContentChecked() {
if (this.feeRateStyle === feeRateStyle.KB) {
this.perkbw = this.feeRates.perkb || {};
} else if (this.feeRateStyle === feeRateStyle.KW) {
this.perkbw = this.feeRates.perkw || {};
}
}
}