From feb8e35ec34be43d4852ed8b88ba11e63530ab62 Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 30 Nov 2021 10:59:10 +0400 Subject: [PATCH] Handle database disabled config when running Liquid fixes #962 --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 291d43e76..3a3bdb197 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -143,7 +143,7 @@ class Server { if (this.wss) { websocketHandler.setWebsocketServer(this.wss); } - if (config.MEMPOOL.NETWORK === 'liquid') { + if (config.MEMPOOL.NETWORK === 'liquid' && config.DATABASE.ENABLED) { blocks.setNewBlockCallback(async () => { try { await elementsParser.$parse(); @@ -270,7 +270,7 @@ class Server { ; } - if (config.MEMPOOL.NETWORK === 'liquid') { + if (config.MEMPOOL.NETWORK === 'liquid' && config.DATABASE.ENABLED) { this.app .get(config.MEMPOOL.API_URL_PREFIX + 'liquid/pegs/month', routes.$getElementsPegsByMonth) ;