Browse Source

fix(api): add casts for optional market price in symbol and exchange rate data services

pull/8356/head
Thomas Kaul 4 weeks ago
parent
commit
b371254a1b
  1. 4
      apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts
  2. 2
      apps/api/src/services/symbol/symbol.service.ts

4
apps/api/src/services/exchange-rate-data/exchange-rate-data.service.ts

@ -337,7 +337,7 @@ export class ExchangeRateDataService {
date: aDate, date: aDate,
symbol: `${DEFAULT_CURRENCY}${aFromCurrency}` symbol: `${DEFAULT_CURRENCY}${aFromCurrency}`
}) })
)?.marketPrice; )?.marketPrice as number;
} }
} catch {} } catch {}
@ -351,7 +351,7 @@ export class ExchangeRateDataService {
date: aDate, date: aDate,
symbol: `${DEFAULT_CURRENCY}${aToCurrency}` symbol: `${DEFAULT_CURRENCY}${aToCurrency}`
}) })
)?.marketPrice; )?.marketPrice as number;
} }
} catch {} } catch {}

2
apps/api/src/services/symbol/symbol.service.ts

@ -50,7 +50,7 @@ export class SymbolService {
symbol: dataGatheringItem.symbol symbol: dataGatheringItem.symbol
}); });
marketPrice = latestMarketData?.marketPrice; marketPrice = latestMarketData?.marketPrice as number;
} else { } else {
const quotes = await this.dataProviderService.getQuotes({ const quotes = await this.dataProviderService.getQuotes({
items: [dataGatheringItem] items: [dataGatheringItem]

Loading…
Cancel
Save