Fixing lint and test errors

Fixing lint and test errors
pull/1063/head
Shahana Farooqui 2 years ago committed by ShahanaFarooqui
parent 9165ae6a58
commit a1a507a44d

@ -62,6 +62,8 @@ jobs:
- name: Lint Scripts
run: npm run lint
- name: Lint Server Script
run: npm run lintServer
test:
name: Test

@ -16,7 +16,8 @@
"serverUbuntu": "NODE_ENV=development nodemon ./rtl.js",
"testdev": "ng test --watch=true --code-coverage",
"test": "ng test --watch=false",
"lint": "ng lint"
"lint": "ng lint",
"lintServer": "eslint ./server/**/* --ext .ts"
},
"private": true,
"dependencies": {

@ -114,7 +114,7 @@ export class CLWebSocketClient {
if (!newClient) { newClient = { selectedNode: null, reConnect: true, webSocketClient: null }; }
newClient.selectedNode = JSON.parse(JSON.stringify(newSelectedNode));
this.webSocketClients[clientIdx] = newClient;
}
};
}

@ -112,7 +112,7 @@ export class ECLWebSocketClient {
if (!newClient) { newClient = { selectedNode: null, reConnect: true, webSocketClient: null }; }
newClient.selectedNode = JSON.parse(JSON.stringify(newSelectedNode));
this.webSocketClients[clientIdx] = newClient;
}
};
}

@ -125,7 +125,7 @@ export class LNDWebSocketClient {
if (this.webSocketClients[clientIdx].selectedNode.ln_version === '' || !this.webSocketClients[clientIdx].selectedNode.ln_version || this.common.isVersionCompatible(this.webSocketClients[clientIdx].selectedNode.ln_version, '0.11.0')) {
this.fetchUnpaidInvoices(this.webSocketClients[clientIdx].selectedNode);
}
}
};
}

@ -49,11 +49,11 @@ export class ExpressApplication {
public loadConfiguration = () => {
this.config.setServerConfiguration();
}
};
public setCORS = () => { CORS.mount(this.app); }
public setCORS = () => { CORS.mount(this.app); };
public setCSRF = () => { CSRF.mount(this.app); }
public setCSRF = () => { CSRF.mount(this.app); };
public setApplicationRoutes = () => {
this.logger.log({ selectedNode: this.common.initSelectedNode, level: 'INFO', fileName: 'App', msg: 'Setting up Application Routes..' });
@ -71,7 +71,7 @@ export class ExpressApplication {
});
this.app.use((err, req, res, next) => this.handleApplicationErrors(err, res));
this.logger.log({ selectedNode: this.common.initSelectedNode, level: 'INFO', fileName: 'App', msg: 'Application Routes Set' });
}
};
public handleApplicationErrors = (err, res) => {
switch (err.code) {

@ -331,7 +331,7 @@ export class CommonService {
throw new Error(err);
}
}
}
};
public refreshCookie = () => {
try {
@ -341,7 +341,7 @@ export class CommonService {
this.logger.log({ selectedNode: this.initSelectedNode, level: 'ERROR', fileName: 'Common', msg: 'Something went wrong while refreshing cookie', error: err });
throw new Error(err);
}
}
};
public createDirectory = (directoryName) => {
const initDir = isAbsolute(directoryName) ? sep : '';
@ -377,7 +377,7 @@ export class CommonService {
} catch (err) {
this.logger.log({ selectedNode: this.initSelectedNode, level: 'ERROR', fileName: 'Common', msg: 'Password hashing failed', error: err });
}
}
};
public getAllNodeAllChannelBackup = (node: CommonSelectedNode) => {
const channel_backup_file = node.channel_backup_path + sep + 'channel-all.bak';
@ -419,7 +419,7 @@ export class CommonService {
(+versionsArr[0] === +checkVersionsArr[0] && +versionsArr[1] === +checkVersionsArr[1] && +versionsArr[2] >= +checkVersionsArr[2]);
}
return false;
}
};
public getMonthDays = (selMonth, selYear) => ((selMonth === 1 && selYear % 4 === 0) ? (this.MONTHS[selMonth].days + 1) : this.MONTHS[selMonth].days);
@ -438,7 +438,7 @@ export class CommonService {
this.logger.log({ selectedNode: selNode, level: 'INFO', fileName: 'Config Setup Variable', msg: 'LN SERVER URL: ' + selNode.ln_server_url });
this.logger.log({ selectedNode: selNode, level: 'INFO', fileName: 'Config Setup Variable', msg: 'LOGOUT REDIRECT LINK: ' + this.logout_redirect_link + '\r\n' });
}
}
};
public filterData = (dataKey, lnImplementation) => {
let search_string = '';
@ -473,7 +473,7 @@ export class CommonService {
const foundDataLine = this.dummy_data_array_from_file.find((dataItem) => dataItem.includes(search_string));
const dataStr = foundDataLine ? foundDataLine.substring((foundDataLine.indexOf(search_string)) + search_string.length) : '{}';
return JSON.parse(dataStr);
}
};
}

@ -49,7 +49,7 @@ export class RTLWebSocketServer {
this.webSocketServer.on('connection', this.mountEventsOnConnection);
this.webSocketServer.on('close', () => clearInterval(this.pingInterval));
this.logger.log({ selectedNode: this.common.initSelectedNode, level: 'INFO', fileName: 'WebSocketServer', msg: 'Websocket Server Connected' });
}
};
public upgradeCallback = (websocket, request) => {
this.webSocketServer.emit('connection', websocket, request);
@ -89,7 +89,7 @@ export class RTLWebSocketServer {
const selectedNode = this.common.findNode(currNodeIndex);
this.logger.log({ selectedNode: !selectedNode ? this.common.initSelectedNode : selectedNode, level: 'ERROR', fileName: 'WebSocketServer', msg: 'Invalid Node Selection. Previous and current node indices can not be less than zero.' });
}
}
};
public disconnectFromNodeClient = (sessionId: string, prevNodeIndex: number) => {
const foundClient = this.clientDetails.find((clientDetail) => clientDetail.index === +prevNodeIndex);
@ -119,7 +119,7 @@ export class RTLWebSocketServer {
}
}
}
}
};
public connectToNodeClient = (sessionId: string, currNodeIndex: number) => {
let foundClient = this.clientDetails.find((clientDetail) => clientDetail.index === +currNodeIndex);
@ -148,7 +148,7 @@ export class RTLWebSocketServer {
}
}
}
}
};
public sendErrorToAllLNClients = (serverError, selectedNode: CommonSelectedNode) => {
try {

@ -32,7 +32,7 @@ export class CLNGraphComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -109,7 +109,7 @@ export class CLNLookupsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -25,7 +25,7 @@ export class CLNQueryRoutesComponent implements OnInit, OnDestroy {
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild('queryRoutesForm', { static: true }) form: any;
public destinationPubkey = '';
public amount: number = null;
public amount: number | null = null;
public qrHops: any;
public flgSticky = false;
public displayedColumns: any[] = [];
@ -108,7 +108,7 @@ export class CLNQueryRoutesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -1,9 +1,8 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { takeUntil, filter, withLatestFrom } from 'rxjs/operators';
import { takeUntil, withLatestFrom } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { Actions } from '@ngrx/effects';
import { faSmile, faFrown } from '@fortawesome/free-regular-svg-icons';
import { faAngleDoubleDown, faAngleDoubleUp, faChartPie, faBolt, faServer, faNetworkWired } from '@fortawesome/free-solid-svg-icons';
@ -72,7 +71,7 @@ export class CLNHomeComponent implements OnInit, OnDestroy {
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
constructor(private logger: LoggerService, private store: Store<RTLState>, private actions: Actions, private commonService: CommonService, private router: Router) {
constructor(private logger: LoggerService, private store: Store<RTLState>, private commonService: CommonService, private router: Router) {
this.screenSize = this.commonService.getScreenSize();
if (this.screenSize === ScreenSizeEnum.XS) {
this.operatorCards = [
@ -156,8 +155,8 @@ export class CLNHomeComponent implements OnInit, OnDestroy {
this.totalOutboundLiquidity = 0;
this.activeChannels = channelsSeletor.activeChannels;
this.activeChannelsCapacity = JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels, 'balancedness'))) || [];
this.allInboundChannels = JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter((channel) => channel.msatoshi_to_them ? channel.msatoshi_to_them > 0 : false), 'msatoshi_to_them'))) || [];
this.allOutboundChannels = JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter((channel) => channel.msatoshi_to_us ? channel.msatoshi_to_us > 0 : false), 'msatoshi_to_us'))) || [];
this.allInboundChannels = JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter((channel) => (channel.msatoshi_to_them ? channel.msatoshi_to_them > 0 : false)), 'msatoshi_to_them'))) || [];
this.allOutboundChannels = JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter((channel) => (channel.msatoshi_to_us ? channel.msatoshi_to_us > 0 : false)), 'msatoshi_to_us'))) || [];
this.activeChannels.forEach((channel) => {
this.totalInboundLiquidity = this.totalInboundLiquidity + Math.ceil((channel.msatoshi_to_them || 0) / 1000);
this.totalOutboundLiquidity = this.totalOutboundLiquidity + Math.floor((channel.msatoshi_to_us || 0) / 1000);

@ -19,7 +19,7 @@ export class CLNNodeInfoComponent implements OnChanges {
if (this.information && this.information.chains && this.information.chains.length > 0) {
this.chains = [''];
this.information.chains.forEach((chain) => {
this.chains.push(this.commonService.titleCase(chain.chain) + ' ' + this.commonService.titleCase(chain.network));
this.chains.push(this.commonService.titleCase(chain.chain || '') + ' ' + this.commonService.titleCase(chain.network || ''));
});
}
}

@ -196,7 +196,7 @@ export class CLNLiquidityAdsListComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -154,7 +154,7 @@ export class CLNNetworkInfoComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -328,7 +328,7 @@ export class CLNOnChainSendModalComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -40,7 +40,7 @@ export class CLNOnChainSendComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -72,7 +72,7 @@ export class CLNOnChainComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -50,7 +50,7 @@ export class CLNUTXOTablesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -40,7 +40,7 @@ export class CLNOnChainUtxosComponent implements OnInit, OnChanges, AfterViewIni
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
@ -67,7 +67,7 @@ export class CLNOnChainUtxosComponent implements OnInit, OnChanges, AfterViewIni
this.errorMessage = '';
this.apiCallStatus = utxosSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.logger.info(utxosSeletor);
});
@ -127,7 +127,7 @@ export class CLNOnChainUtxosComponent implements OnInit, OnChanges, AfterViewIni
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -95,7 +95,7 @@ export class CLNBumpFeeComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -36,7 +36,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
public faEye = faEye;
public faEyeSlash = faEyeSlash
public faEyeSlash = faEyeSlash;
public totalBalance = 0;
public displayedColumns: any[] = [];
public channelsData: Channel[] = [];
@ -52,7 +52,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -71,7 +71,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
this.flgSticky = true;
this.displayedColumns = ['short_channel_id', 'alias', 'msatoshi_to_us', 'msatoshi_to_them', 'balancedness', 'actions'];
}
this.selFilter = this.router.getCurrentNavigation().extras?.state?.filter ? this.router.getCurrentNavigation().extras?.state?.filter : '';
this.selFilter = this.router?.getCurrentNavigation()?.extras?.state?.filter ? this.router?.getCurrentNavigation()?.extras?.state?.filter : '';
}
ngOnInit() {
@ -79,7 +79,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
subscribe((infoBalNumpeersSelector: { information: GetInfo, balance: Balance, numPeers: number }) => {
this.information = infoBalNumpeersSelector.information;
this.numPeers = infoBalNumpeersSelector.numPeers;
this.totalBalance = infoBalNumpeersSelector.balance.totalBalance;
this.totalBalance = infoBalNumpeersSelector.balance.totalBalance || 0;
this.logger.info(infoBalNumpeersSelector);
});
this.store.select(channels).pipe(takeUntil(this.unSubs[1])).
@ -87,7 +87,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
this.errorMessage = '';
this.apiCallStatus = channelsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.channelsData = channelsSeletor.activeChannels;
if (this.channelsData.length > 0) {
@ -104,7 +104,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
}
onViewRemotePolicy(selChannel: Channel) {
this.store.dispatch(channelLookup({ payload: { uiMessage: UI_MESSAGES.GET_REMOTE_POLICY, shortChannelID: selChannel.short_channel_id, showError: true } }));
this.store.dispatch(channelLookup({ payload: { uiMessage: UI_MESSAGES.GET_REMOTE_POLICY, shortChannelID: selChannel.short_channel_id || '', showError: true } }));
this.clnEffects.setLookupCL.pipe(take(1)).subscribe((resLookup: ChannelEdge[]): boolean | void => {
if (resLookup.length === 0) {
return false;
@ -233,7 +233,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
pipe(takeUntil(this.unSubs[3])).
subscribe((confirmRes) => {
if (confirmRes) {
this.store.dispatch(closeChannel({ payload: { id: channelToClose.id, channelId: channelToClose.channel_id, force: false } }));
this.store.dispatch(closeChannel({ payload: { id: channelToClose.id || '', channelId: channelToClose.channel_id || '', force: false } }));
}
});
}
@ -281,7 +281,7 @@ export class CLNChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -49,7 +49,7 @@ export class CLNChannelPendingTableComponent implements OnInit, AfterViewInit, O
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -86,7 +86,7 @@ export class CLNChannelPendingTableComponent implements OnInit, AfterViewInit, O
this.errorMessage = '';
this.apiCallStatus = channelsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.channelsData = [...channelsSeletor.pendingChannels, ...channelsSeletor.inactiveChannels];
this.channelsData = this.channelsData.sort((a, b) => ((this.CLNChannelPendingState[a.state] >= this.CLNChannelPendingState[b.state]) ? 1 : -1));
@ -185,7 +185,7 @@ export class CLNChannelPendingTableComponent implements OnInit, AfterViewInit, O
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -92,7 +92,7 @@ export class CLNChannelsTablesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -189,7 +189,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -186,7 +186,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -59,7 +59,7 @@ export class CLNConnectionsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -50,7 +50,7 @@ export class CLNPeersComponent implements OnInit, AfterViewInit, OnDestroy {
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -82,7 +82,7 @@ export class CLNPeersComponent implements OnInit, AfterViewInit, OnDestroy {
this.errorMessage = '';
this.apiCallStatus = peersSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.peersData = peersSeletor.peers || [];
if (this.peersData.length > 0) {
@ -209,7 +209,7 @@ export class CLNPeersComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class CLNReportsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -170,7 +170,7 @@ export class CLNTransactionsReportComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -13,6 +13,7 @@ import { mockDataService, mockLoggerService } from '../../../shared/test-helpers
import { SharedModule } from '../../../shared/shared.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { DataService } from '../../../shared/services/data.service';
import { RouterTestingModule } from '@angular/router/testing';
describe('CLNForwardingHistoryComponent', () => {
let component: CLNForwardingHistoryComponent;
@ -23,6 +24,7 @@ describe('CLNForwardingHistoryComponent', () => {
declarations: [CLNForwardingHistoryComponent],
imports: [
BrowserAnimationsModule,
RouterTestingModule,
SharedModule,
StoreModule.forRoot({ root: RootReducer, lnd: LNDReducer, cln: CLNReducer, ecl: ECLReducer })
],

@ -43,7 +43,7 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
public errorMessage = '';
public filterIn = '';
public filterOut = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -71,7 +71,7 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
this.errorMessage = '';
this.apiCallStatus = fhSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.successfulEvents = fhSeletor.forwardingHistory.listForwards || [];
if (this.successfulEvents.length > 0 && this.sortIn && this.paginatorIn && this.sortOut && this.paginatorOut) {
@ -157,7 +157,7 @@ export class CLNRoutingPeersComponent implements OnInit, OnChanges, AfterViewIni
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class CLNRoutingComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class CLNSignVerifyMessageComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -49,7 +49,7 @@ export class CLNSignComponent implements OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -57,7 +57,7 @@ export class CLNVerifyComponent implements OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -117,7 +117,7 @@ export class CLNCreateInvoiceComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -76,7 +76,7 @@ export class CLNInvoiceInformationComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -60,7 +60,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -93,7 +93,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
this.errorMessage = '';
this.apiCallStatus = invoicesSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.invoiceJSONArr = invoicesSeletor.listInvoices.invoices || [];
if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) {
@ -237,7 +237,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -93,7 +93,7 @@ export class CLNCreateOfferComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -44,7 +44,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O
public screenSizeEnum = ScreenSizeEnum;
public selFilter = '';
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -71,7 +71,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O
this.errorMessage = '';
this.apiCallStatus = offerBMsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.offersBookmarksJSONArr = offerBMsSeletor.offersBookmarks || [];
if (this.offersBookmarksJSONArr && this.offersBookmarksJSONArr.length > 0 && this.sort && this.paginator) {
@ -152,7 +152,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -76,7 +76,7 @@ export class CLNOfferInformationComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -62,7 +62,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -95,7 +95,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy
this.errorMessage = '';
this.apiCallStatus = offersSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.offerJSONArr = offersSeletor.offers || [];
if (this.offerJSONArr && this.offerJSONArr.length > 0 && this.sort && this.paginator) {
@ -240,7 +240,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -57,7 +57,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -94,7 +94,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
this.errorMessage = '';
this.apiCallStatus = paymentsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.paymentJSONArr = paymentsSeletor.payments || [];
if (this.paymentJSONArr.length > 0) {
@ -321,7 +321,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -378,7 +378,7 @@ export class CLNLightningSendPaymentsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -71,7 +71,7 @@ export class CLNTransactionsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class ECLGraphComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -125,7 +125,7 @@ export class ECLLookupsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -106,7 +106,7 @@ export class ECLQueryRoutesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -197,7 +197,7 @@ export class ECLHomeComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -125,7 +125,7 @@ export class ECLOnChainSendModalComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -40,7 +40,7 @@ export class ECLOnChainSendComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -41,7 +41,7 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unsub: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -69,7 +69,7 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
this.errorMessage = '';
this.apiCallStatus = transactionsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
if (transactionsSelector.transactions) {
this.loadTransactionsTable(transactionsSelector.transactions);
@ -124,7 +124,7 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
ngOnDestroy() {
this.unsub.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -62,7 +62,7 @@ export class ECLOnChainComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -33,7 +33,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
public faEye = faEye;
public faEyeSlash = faEyeSlash
public faEyeSlash = faEyeSlash;
public inactiveChannels: Channel[];
public totalBalance = 0;
public displayedColumns: any[] = [];
@ -49,7 +49,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -76,7 +76,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
this.errorMessage = '';
this.apiCallStatus = allChannelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.inactiveChannels = allChannelsSelector.inactiveChannels;
this.loadChannelsTable();
@ -92,7 +92,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
});
this.store.select(onchainBalance).pipe(takeUntil(this.unSubs[3])).
subscribe((ocBalSelector: { onchainBalance: OnChainBalance, apiCallStatus: ApiCallStatusPayload }) => {
this.totalBalance = ocBalSelector.onchainBalance.total;
this.totalBalance = ocBalSelector.onchainBalance.total || 0;
});
}
@ -123,7 +123,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
pipe(takeUntil(this.unSubs[4])).
subscribe((confirmRes) => {
if (confirmRes) {
this.store.dispatch(closeChannel({ payload: { channelId: channelToClose.channelId, force: forceClose } }));
this.store.dispatch(closeChannel({ payload: { channelId: channelToClose.channelId || '', force: forceClose } }));
}
});
}
@ -163,7 +163,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, AfterViewInit,
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -34,7 +34,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
@ViewChild(MatSort, { static: false }) sort: MatSort | undefined;
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined;
public faEye = faEye;
public faEyeSlash = faEyeSlash
public faEyeSlash = faEyeSlash;
public activeChannels: Channel[];
public totalBalance = 0;
public displayedColumns: any[] = [];
@ -50,7 +50,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -69,7 +69,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
this.flgSticky = true;
this.displayedColumns = ['shortChannelId', 'alias', 'feeBaseMsat', 'feeProportionalMillionths', 'toLocal', 'toRemote', 'balancedness', 'actions'];
}
this.selFilter = this.router.getCurrentNavigation().extras?.state?.filter ? this.router.getCurrentNavigation().extras?.state?.filter : '';
this.selFilter = this.router.getCurrentNavigation()?.extras?.state?.filter ? this.router.getCurrentNavigation()?.extras?.state?.filter : '';
}
ngOnInit() {
@ -78,7 +78,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
this.errorMessage = '';
this.apiCallStatus = allChannelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.activeChannels = allChannelsSelector.activeChannels;
if (this.activeChannels.length > 0 && this.sort && this.paginator) {
@ -96,7 +96,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
});
this.store.select(onchainBalance).pipe(takeUntil(this.unSubs[3])).
subscribe((ocBalSelector: { onchainBalance: OnChainBalance, apiCallStatus: ApiCallStatusPayload }) => {
this.totalBalance = ocBalSelector.onchainBalance.total;
this.totalBalance = ocBalSelector.onchainBalance.total || 0;
});
}
@ -136,7 +136,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
if (confirmRes) {
const base_fee = confirmRes[0].inputValue;
const fee_rate = confirmRes[1].inputValue;
let updateRequestPayload = null;
let updateRequestPayload: any = null;
if (this.commonService.isVersionCompatible(this.information.version, '0.6.2')) {
let node_ids = '';
if (channelToUpdate === 'all') {
@ -231,7 +231,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -46,7 +46,7 @@ export class ECLChannelPendingTableComponent implements OnInit, AfterViewInit, O
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -73,7 +73,7 @@ export class ECLChannelPendingTableComponent implements OnInit, AfterViewInit, O
this.errorMessage = '';
this.apiCallStatus = allChannelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.pendingChannels = allChannelsSelector.pendingChannels;
this.loadChannelsTable();
@ -134,7 +134,7 @@ export class ECLChannelPendingTableComponent implements OnInit, AfterViewInit, O
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -91,7 +91,7 @@ export class ECLChannelsTablesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -131,7 +131,7 @@ export class ECLOpenChannelComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -151,7 +151,7 @@ export class ECLConnectPeerComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -56,7 +56,7 @@ export class ECLConnectionsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -50,7 +50,7 @@ export class ECLPeersComponent implements OnInit, AfterViewInit, OnDestroy {
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -81,7 +81,7 @@ export class ECLPeersComponent implements OnInit, AfterViewInit, OnDestroy {
this.errorMessage = '';
this.apiCallStatus = peersSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.peersData = peersSelector.peers;
this.loadPeersTable(this.peersData);
@ -211,7 +211,7 @@ export class ECLPeersComponent implements OnInit, AfterViewInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class ECLReportsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -196,7 +196,7 @@ export class ECLRoutingReportComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -172,7 +172,7 @@ export class ECLTransactionsReportComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -39,7 +39,7 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -67,7 +67,7 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
this.errorMessage = '';
this.apiCallStatus = paymentsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.eventsData = paymentsSelector.payments && paymentsSelector.payments.relayed ? paymentsSelector.payments.relayed : [];
if (this.eventsData.length > 0 && this.sort && this.paginator) {
@ -160,7 +160,7 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -41,7 +41,7 @@ export class ECLRoutingPeersComponent implements OnInit, AfterViewInit, OnDestro
public errorMessage = '';
public filterIn = '';
public filterOut = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -69,7 +69,7 @@ export class ECLRoutingPeersComponent implements OnInit, AfterViewInit, OnDestro
this.errorMessage = '';
this.apiCallStatus = paymentsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.routingPeersData = paymentsSelector.payments && paymentsSelector.payments.relayed ? paymentsSelector.payments.relayed : [];
if (this.routingPeersData.length > 0 && this.sortIn && this.paginatorIn && this.sortOut && this.paginatorOut) {
@ -141,7 +141,7 @@ export class ECLRoutingPeersComponent implements OnInit, AfterViewInit, OnDestro
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -36,7 +36,7 @@ export class ECLRoutingComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -767,7 +767,7 @@ export class ECLEffects implements OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -121,7 +121,7 @@ export class ECLCreateInvoiceComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -75,7 +75,7 @@ export class ECLInvoiceInformationComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -57,7 +57,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -92,7 +92,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
this.errorMessage = '';
this.apiCallStatus = invoicesSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.invoiceJSONArr = (invoicesSelector.invoices && invoicesSelector.invoices.length > 0) ? invoicesSelector.invoices : [];
if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) {
@ -211,7 +211,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -57,7 +57,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -96,7 +96,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
this.errorMessage = '';
this.apiCallStatus = paymentsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.paymentJSONArr = (paymentsSeletor.payments && paymentsSeletor.payments.sent && paymentsSeletor.payments.sent.length > 0) ? paymentsSeletor.payments.sent : [];
// FOR MPP TESTING START
@ -401,7 +401,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -182,7 +182,7 @@ export class ECLLightningSendPaymentsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -55,7 +55,7 @@ export class ECLTransactionsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class BackupComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -48,7 +48,7 @@ export class ChannelBackupTableComponent implements OnInit, AfterViewInit, OnDes
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -63,7 +63,7 @@ export class ChannelBackupTableComponent implements OnInit, AfterViewInit, OnDes
this.errorMessage = '';
this.apiCallStatus = channelsSeletor.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.channelsData = channelsSeletor.channels;
if (this.channelsData.length > 0) {
@ -136,7 +136,7 @@ export class ChannelBackupTableComponent implements OnInit, AfterViewInit, OnDes
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -90,7 +90,7 @@ export class ChannelRestoreTableComponent implements OnInit, AfterViewInit, OnDe
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -32,7 +32,7 @@ export class GraphComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -99,7 +99,7 @@ export class LookupsComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -106,7 +106,7 @@ export class QueryRoutesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -65,7 +65,7 @@ export class ChannelLiquidityInfoComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -259,7 +259,7 @@ export class HomeComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -128,7 +128,7 @@ export class NetworkInfoComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -61,7 +61,7 @@ export class OnChainLabelModalComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -258,7 +258,7 @@ export class OnChainSendModalComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -40,7 +40,7 @@ export class OnChainSendComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -59,7 +59,7 @@ export class OnChainComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -41,7 +41,7 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnChanges, On
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -68,7 +68,7 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnChanges, On
this.errorMessage = '';
this.apiCallStatus = transactionsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
if (transactionsSelector.transactions && transactionsSelector.transactions.length > 0) {
this.transactions = transactionsSelector.transactions;
@ -133,7 +133,7 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnChanges, On
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -53,7 +53,7 @@ export class UTXOTablesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -47,7 +47,7 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy {
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -74,7 +74,7 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy {
this.errorMessage = '';
this.apiCallStatus = utxosSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
if (utxosSelector.utxos && utxosSelector.utxos.length > 0) {
this.dustUtxos = utxosSelector.utxos.filter((utxo) => +utxo.amount_sat < 1000);
@ -190,7 +190,7 @@ export class OnChainUTXOsComponent implements OnInit, OnChanges, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -84,7 +84,7 @@ export class BumpFeeComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -283,7 +283,7 @@ export class ChannelRebalanceComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -40,7 +40,7 @@ export class ChannelActiveHTLCsTableComponent implements OnInit, AfterViewInit,
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -67,7 +67,7 @@ export class ChannelActiveHTLCsTableComponent implements OnInit, AfterViewInit,
this.errorMessage = '';
this.apiCallStatus = channelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.channelsJSONArr = channelsSelector.channels.filter((channel) => channel.pending_htlcs && channel.pending_htlcs.length > 0) || [];
this.loadHTLCsTable(this.channelsJSONArr);
@ -168,7 +168,7 @@ export class ChannelActiveHTLCsTableComponent implements OnInit, AfterViewInit,
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -41,7 +41,7 @@ export class ChannelClosedTableComponent implements OnInit, AfterViewInit, OnDes
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public selFilter = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unsub: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
@ -65,7 +65,7 @@ export class ChannelClosedTableComponent implements OnInit, AfterViewInit, OnDes
this.errorMessage = '';
this.apiCallStatus = closedChannelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.closedChannelsData = closedChannelsSelector.closedChannels;
if (this.closedChannelsData.length > 0) {
@ -127,7 +127,7 @@ export class ChannelClosedTableComponent implements OnInit, AfterViewInit, OnDes
ngOnDestroy() {
this.unsub.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -56,12 +56,12 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
public pageSizeOptions = PAGE_SIZE_OPTIONS;
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public versionsArr = [];
public versionsArr: string[] = [];
public faEye = faEye;
public faEyeSlash = faEyeSlash
public faEyeSlash = faEyeSlash;
private targetConf = 6;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
@ -80,7 +80,7 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
this.flgSticky = true;
this.displayedColumns = ['remote_alias', 'uptime', 'total_satoshis_sent', 'total_satoshis_received', 'local_balance', 'remote_balance', 'balancedness', 'actions'];
}
this.selFilter = this.router.getCurrentNavigation().extras?.state?.filter ? this.router.getCurrentNavigation().extras?.state?.filter : '';
this.selFilter = this.router.getCurrentNavigation()?.extras?.state?.filter ? this.router.getCurrentNavigation()?.extras?.state?.filter : '';
}
ngOnInit() {
@ -101,14 +101,14 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
});
this.store.select(blockchainBalance).pipe(takeUntil(this.unSubs[3])).
subscribe((bcBalanceSelector: { blockchainBalance: BlockchainBalance, apiCallStatus: ApiCallStatusPayload }) => {
this.totalBalance = +bcBalanceSelector.blockchainBalance.total_balance;
this.totalBalance = bcBalanceSelector.blockchainBalance?.total_balance ? +bcBalanceSelector.blockchainBalance?.total_balance : 0;
});
this.store.select(channels).pipe(takeUntil(this.unSubs[4])).
subscribe((channelsSelector: { channels: Channel[], channelsSummary: ChannelsSummary, lightningBalance: LightningBalance, apiCallStatus: ApiCallStatusPayload }) => {
this.errorMessage = '';
this.apiCallStatus = channelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.channelsData = this.calculateUptime(channelsSelector.channels);
if (this.channelsData.length > 0) {
@ -125,7 +125,7 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
}
onViewRemotePolicy(selChannel: Channel) {
this.store.dispatch(channelLookup({ payload: { uiMessage: UI_MESSAGES.GET_REMOTE_POLICY, channelID: selChannel.chan_id.toString() + '/' + this.information.identity_pubkey } }));
this.store.dispatch(channelLookup({ payload: { uiMessage: UI_MESSAGES.GET_REMOTE_POLICY, channelID: selChannel.chan_id?.toString() + '/' + this.information.identity_pubkey } }));
this.lndEffects.setLookup.pipe(take(1)).subscribe((resLookup): boolean | void => {
if (!resLookup.fee_base_msat && !resLookup.fee_rate_milli_msat && !resLookup.time_lock_delta) {
return false;
@ -376,7 +376,7 @@ export class ChannelOpenTableComponent implements OnInit, AfterViewInit, OnDestr
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -44,7 +44,7 @@ export class ChannelPendingTableComponent implements OnInit, AfterViewInit, OnDe
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
public errorMessage = '';
public apiCallStatus: ApiCallStatusPayload = null;
public apiCallStatus: ApiCallStatusPayload | null = null;
public apiCallStatusEnum = APICallStatusEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
@ -76,7 +76,7 @@ export class ChannelPendingTableComponent implements OnInit, AfterViewInit, OnDe
this.errorMessage = '';
this.apiCallStatus = pendingChannelsSelector.apiCallStatus;
if (this.apiCallStatus.status === APICallStatusEnum.ERROR) {
this.errorMessage = (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
}
this.pendingChannels = pendingChannelsSelector.pendingChannels;
if (this.pendingChannels.pending_open_channels && this.pendingChannels.pending_open_channels.length && this.pendingChannels.pending_open_channels.length > 0) {
@ -272,7 +272,7 @@ export class ChannelPendingTableComponent implements OnInit, AfterViewInit, OnDe
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -95,7 +95,7 @@ export class ChannelsTablesComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -79,7 +79,7 @@ export class CloseChannelComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

@ -138,7 +138,7 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.unSubs.forEach((completeSub) => {
completeSub.next(null);
completeSub.next(<any>null);
completeSub.complete();
});
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save