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, Input, OnInit, OnDestroy } from '@angular/core';
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
import { Subject } from 'rxjs';
|
|
|
|
import { Store } from '@ngrx/store';
|
|
|
|
|
|
|
|
import { Channel } from '../../../shared/models/lndModels';
|
|
|
|
|
|
|
|
import * as fromRTLReducer from '../../../store/rtl.reducers';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'rtl-channel-liquidity-info',
|
|
|
|
templateUrl: './channel-liquidity-info.component.html',
|
|
|
|
styleUrls: ['./channel-liquidity-info.component.scss']
|
|
|
|
})
|
|
|
|
export class ChannelLiquidityInfoComponent implements OnInit, OnDestroy {
|
|
|
|
@Input() direction: string;
|
|
|
|
@Input() totalLiquidity: number;
|
|
|
|
@Input() allChannels: Channel[];
|
|
|
|
private targetConf = 6;
|
|
|
|
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
|
|
|
|
|
|
|
|
constructor(private router: Router, private store: Store<fromRTLReducer.RTLState>) {}
|
|
|
|
|
|
|
|
ngOnInit() {}
|
|
|
|
|
|
|
|
goToChannels() {
|
|
|
|
this.router.navigateByUrl('/lnd/peerschannels');
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnDestroy() {
|
|
|
|
this.unSubs.forEach(completeSub => {
|
|
|
|
completeSub.next();
|
|
|
|
completeSub.complete();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|