From c7e9b47aa0f19f35b7ad33ecec8317fc55ff08b4 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 31 May 2022 20:29:43 +0200 Subject: [PATCH] Only attempt to save fx rate if database is enabled --- backend/src/api/blocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index 814d967f3..a87d34a1a 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -343,7 +343,7 @@ class Blocks { await blocksRepository.$saveBlockInDatabase(blockExtended); } } - if (fiatConversion.ratesInitialized === true) { + if (fiatConversion.ratesInitialized === true && config.DATABASE.ENABLED === true) { await RatesRepository.$saveRate(blockExtended.height, fiatConversion.getConversionRates()); }