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) ;