From 9043d23a03753d42359de28674495e8c11a8e431 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Wed, 1 Mar 2023 19:11:03 +0900 Subject: [PATCH] Ignore negative USD prices --- backend/src/repositories/PricesRepository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/repositories/PricesRepository.ts b/backend/src/repositories/PricesRepository.ts index 83336eaff..6493735ee 100644 --- a/backend/src/repositories/PricesRepository.ts +++ b/backend/src/repositories/PricesRepository.ts @@ -40,7 +40,7 @@ export const MAX_PRICES = { class PricesRepository { public async $savePrices(time: number, prices: IConversionRates): Promise { - if (prices.USD === 0) { + if (prices.USD === -1) { // Some historical price entries have no USD prices, so we just ignore them to avoid future UX issues // As of today there are only 4 (on 2013-09-05, 2013-0909, 2013-09-12 and 2013-09-26) so that's fine return;