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/lnd/home/channel-liquidity-info/channel-liquidity-info.comp...

22 lines
728 B
TypeScript

import { Component, OnChanges, Input } from '@angular/core';
import { Channel } from '../../../shared/models/lndModels';
@Component({
selector: 'rtl-channel-liquidity-info',
templateUrl: './channel-liquidity-info.component.html',
styleUrls: ['./channel-liquidity-info.component.scss']
})
export class ChannelLiquidityInfoComponent implements OnChanges {
@Input() direction: string;
@Input() totalLiquidity: number;
@Input() allChannels: Channel[];
public maxTransactionAmount = 0;
constructor() {}
ngOnChanges() {
this.maxTransactionAmount = this.allChannels && this.allChannels.length > 0 ? (this.direction === 'In' ? this.allChannels[0].remote_balance : this.allChannels[0].local_balance) : 0;
}
}