From 77acd0f5551eb4def0224606019c325f81298b90 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 25 Jan 2024 23:20:48 +0100 Subject: [PATCH] Format name --- .../eod-historical-data/eod-historical-data.service.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts index 39457320f..7ebb86b44 100644 --- a/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts +++ b/apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts @@ -362,6 +362,14 @@ export class EodHistoricalDataService implements DataProviderInterface { return aSymbol; } + private formatName({ name }: { name: string }) { + if (name) { + name = name.replace('iShares VII PLC - ', ''); + } + + return name; + } + private async getSearchResult(aQuery: string): Promise< (LookupItem & { assetClass: AssetClass; @@ -397,9 +405,9 @@ export class EodHistoricalDataService implements DataProviderInterface { assetClass, assetSubClass, isin, - name, currency: this.convertCurrency(Currency), dataSource: this.getName(), + name: this.formatName({ name }), symbol: `${Code}.${Exchange}` }; }