From 0cb1e575fce9db9fc7b95f22108cbd1f07508100 Mon Sep 17 00:00:00 2001 From: Shahana Farooqui Date: Fri, 28 Apr 2023 22:59:25 -0700 Subject: [PATCH] Lint error fix --- .../channel-rebalance.component.ts | 2 +- src/app/shared/services/data.service.ts | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/app/eclair/peers-channels/channels/channel-rebalance-modal/channel-rebalance.component.ts b/src/app/eclair/peers-channels/channels/channel-rebalance-modal/channel-rebalance.component.ts index 5e69a744..aaedb349 100644 --- a/src/app/eclair/peers-channels/channels/channel-rebalance-modal/channel-rebalance.component.ts +++ b/src/app/eclair/peers-channels/channels/channel-rebalance-modal/channel-rebalance.component.ts @@ -8,7 +8,7 @@ import { takeUntil, startWith } from 'rxjs/operators'; import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; import { ECLChannelRebalanceAlert } from '../../../../shared/models/alertData'; -import { Channel, GetInfo, Invoice } from '../../../../shared/models/eclModels'; +import { Channel, GetInfo } from '../../../../shared/models/eclModels'; import { opacityAnimation } from '../../../../shared/animation/opacity-animation'; import { DataService } from '../../../../shared/services/data.service'; diff --git a/src/app/shared/services/data.service.ts b/src/app/shared/services/data.service.ts index d0c3e6f7..cec7e86c 100644 --- a/src/app/shared/services/data.service.ts +++ b/src/app/shared/services/data.service.ts @@ -26,10 +26,11 @@ export class DataService implements OnDestroy { private lnImplementation = ''; public lnImplementationUpdated: BehaviorSubject = new BehaviorSubject(null); private unSubs: Array> = [ - new Subject(), new Subject(), new Subject(), - new Subject(), new Subject(), new Subject(), - new Subject(), new Subject(), new Subject(), - new Subject(), new Subject(), new Subject(), new Subject()]; + new Subject(), new Subject(), new Subject(), + new Subject(), new Subject(), new Subject(), + new Subject(), new Subject(), new Subject(), + new Subject(), new Subject(), new Subject(), new Subject() + ]; constructor(private httpClient: HttpClient, private store: Store, private logger: LoggerService, private snackBar: MatSnackBar, private titleCasePipe: TitleCasePipe) { } @@ -332,13 +333,11 @@ export class DataService implements OnDestroy { } circularRebalance(amountMSat: number, sourceShortChannelId: string = '', sourceNodeId: string = '', targetShortChannelId: string = '', targetNodeId: string = '', ignoreNodeIds: string[] = [], format: string = 'shortChannelId') { - let url = this.APIUrl + '/' + this.lnImplementation + API_END_POINTS.CHANNELS_API + '/circularRebalance'; - let reqBody = { amountMsat: amountMSat, sourceShortChannelId: sourceShortChannelId, sourceNodeId: sourceNodeId, targetShortChannelId: targetShortChannelId, targetNodeId: targetNodeId, ignoreNodeIds: ignoreNodeIds, format: format }; + const url = this.APIUrl + '/' + this.lnImplementation + API_END_POINTS.CHANNELS_API + '/circularRebalance'; + const reqBody = { amountMsat: amountMSat, sourceShortChannelId: sourceShortChannelId, sourceNodeId: sourceNodeId, targetShortChannelId: targetShortChannelId, targetNodeId: targetNodeId, ignoreNodeIds: ignoreNodeIds, format: format }; return this.httpClient.post(url, reqBody).pipe( takeUntil(this.unSubs[12]), - map((res: any) => { - return res; - }), + map((res: any) => res), catchError((err) => { this.handleErrorWithoutAlert('Rebalance Channel', UI_MESSAGES.REBALANCE_CHANNEL, err); return throwError(() => new Error(this.extractErrorMessage(err)));