Lint error fix

This commit is contained in:
Shahana Farooqui 2023-04-28 22:59:25 -07:00
parent e46a5623ba
commit 0cb1e575fc
2 changed files with 9 additions and 10 deletions

View file

@ -8,7 +8,7 @@ import { takeUntil, startWith } from 'rxjs/operators';
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
import { ECLChannelRebalanceAlert } from '../../../../shared/models/alertData'; 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 { opacityAnimation } from '../../../../shared/animation/opacity-animation';
import { DataService } from '../../../../shared/services/data.service'; import { DataService } from '../../../../shared/services/data.service';

View file

@ -26,10 +26,11 @@ export class DataService implements OnDestroy {
private lnImplementation = ''; private lnImplementation = '';
public lnImplementationUpdated: BehaviorSubject<any> = new BehaviorSubject(null); public lnImplementationUpdated: BehaviorSubject<any> = new BehaviorSubject(null);
private unSubs: Array<Subject<void>> = [ private unSubs: Array<Subject<void>> = [
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<RTLState>, private logger: LoggerService, private snackBar: MatSnackBar, private titleCasePipe: TitleCasePipe) { } constructor(private httpClient: HttpClient, private store: Store<RTLState>, 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') { 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'; const 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 reqBody = { amountMsat: amountMSat, sourceShortChannelId: sourceShortChannelId, sourceNodeId: sourceNodeId, targetShortChannelId: targetShortChannelId, targetNodeId: targetNodeId, ignoreNodeIds: ignoreNodeIds, format: format };
return this.httpClient.post(url, reqBody).pipe( return this.httpClient.post(url, reqBody).pipe(
takeUntil(this.unSubs[12]), takeUntil(this.unSubs[12]),
map((res: any) => { map((res: any) => res),
return res;
}),
catchError((err) => { catchError((err) => {
this.handleErrorWithoutAlert('Rebalance Channel', UI_MESSAGES.REBALANCE_CHANNEL, err); this.handleErrorWithoutAlert('Rebalance Channel', UI_MESSAGES.REBALANCE_CHANNEL, err);
return throwError(() => new Error(this.extractErrorMessage(err))); return throwError(() => new Error(this.extractErrorMessage(err)));