Add fake entry for missing price data before 2010-07-19

This commit is contained in:
natsoni 2024-03-12 20:50:48 +01:00
parent b99e5c4160
commit a95d17950f
No known key found for this signature in database
GPG key ID: C65917583181743B

View file

@ -401,6 +401,13 @@ class PricesRepository {
['USD']: rate['USD']
};
});
if (filteredRates.length === 0) { // No price data before 2010-07-19: add a fake entry
filteredRates.push({
time: 1279497600,
[currency]: 0,
['USD']: 0
});
}
return {
prices: filteredRates as ApiPrice[],
exchangeRates: exchangeRates