diff --git a/apps/api/src/services/data-provider/data-provider.service.ts b/apps/api/src/services/data-provider/data-provider.service.ts index c4670bc3b..bf23f96c1 100644 --- a/apps/api/src/services/data-provider/data-provider.service.ts +++ b/apps/api/src/services/data-provider/data-provider.service.ts @@ -575,8 +575,8 @@ export class DataProviderService { query: string; user: UserWithSettings; }): Promise { - const promises: Promise[] = []; let lookupItems: LookupItem[] = []; + const promises: Promise[] = []; if (query?.length < 2) { return { items: lookupItems }; @@ -606,9 +606,9 @@ export class DataProviderService { }); const filteredItems = lookupItems - .filter((lookupItem) => { + .filter(({ currency }) => { // Only allow symbols with supported currency - return lookupItem.currency ? true : false; + return currency ? true : false; }) .sort(({ name: name1 }, { name: name2 }) => { return name1?.toLowerCase().localeCompare(name2?.toLowerCase()); diff --git a/apps/client/src/app/services/data.service.ts b/apps/client/src/app/services/data.service.ts index 1d40de69c..cde7555b2 100644 --- a/apps/client/src/app/services/data.service.ts +++ b/apps/client/src/app/services/data.service.ts @@ -466,8 +466,8 @@ export class DataService { return this.http .get('/api/v1/symbol/lookup', { params }) .pipe( - map((respose) => { - return respose.items; + map(({ items }) => { + return items; }) ); }