mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
parent
f5e270c770
commit
55646b5732
@ -4,7 +4,7 @@ import { Router } from '@angular/router';
|
||||
import { AssetsService } from 'src/app/services/assets.service';
|
||||
import { StateService } from 'src/app/services/state.service';
|
||||
import { Observable, of, Subject, merge } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, switchMap, filter } from 'rxjs/operators';
|
||||
import { debounceTime, distinctUntilChanged, switchMap, filter, catchError } from 'rxjs/operators';
|
||||
import { ElectrsApiService } from 'src/app/services/electrs-api.service';
|
||||
import { NgbTypeahead } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
@ -39,7 +39,8 @@ export class SearchFormComponent implements OnInit {
|
||||
.pipe(
|
||||
switchMap((text) => {
|
||||
if (!text.length) { return of([]); }
|
||||
return this.electrsApiService.getAddressesByPrefix$(text);
|
||||
return this.electrsApiService.getAddressesByPrefix$(text)
|
||||
.pipe(catchError(() => of([])));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user