Search result fix when Lightning not enabled

This commit is contained in:
softsimon
2022-07-06 16:21:14 +02:00
parent 850060cc07
commit 1f2254681a
3 changed files with 9 additions and 2 deletions

View File

@@ -80,6 +80,12 @@ export class SearchFormComponent implements OnInit {
}
]);
}
if (!this.stateService.env.LIGHTNING) {
return zip(
this.electrsApiService.getAddressesByPrefix$(text).pipe(catchError(() => of([]))),
[{ nodes: [], channels: [] }]
);
}
return zip(
this.electrsApiService.getAddressesByPrefix$(text).pipe(catchError(() => of([]))),
this.apiService.lightningSearch$(text).pipe(catchError(() => of({