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.
22 lines
728 B
TypeScript
22 lines
728 B
TypeScript
5 years ago
|
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;
|
||
|
}
|
||
|
|
||
|
}
|