Feature/extend database seed (#23)
* Extend database seed * platforms * transactions of demo user * Improve error handling
This commit is contained in:
@@ -58,8 +58,8 @@ export class ExchangeRateDataService {
|
||||
if (!this.currencies[pair]) {
|
||||
// Not found, calculate indirectly via USD
|
||||
this.currencies[pair] =
|
||||
resultExtended[`${currency1}${Currency.USD}`][date].marketPrice *
|
||||
resultExtended[`${Currency.USD}${currency2}`][date].marketPrice;
|
||||
resultExtended[`${currency1}${Currency.USD}`]?.[date]?.marketPrice *
|
||||
resultExtended[`${Currency.USD}${currency2}`]?.[date]?.marketPrice;
|
||||
|
||||
// Calculate the opposite direction
|
||||
this.currencies[`${currency2}${currency1}`] = 1 / this.currencies[pair];
|
||||
|
Reference in New Issue
Block a user