diff --git a/backend/src/api/pools-parser.ts b/backend/src/api/pools-parser.ts index c3cc994a2..e37414bbe 100644 --- a/backend/src/api/pools-parser.ts +++ b/backend/src/api/pools-parser.ts @@ -127,7 +127,7 @@ class PoolsParser { if (!equals(JSON.parse(existingPool.addresses), poolObj.addresses) || !equals(JSON.parse(existingPool.regexes), poolObj.regexes)) { finalPoolDataUpdate.push(poolObj); } - } else { + } else if (config.DATABASE.ENABLED) { // Double check that if we're not just renaming a pool (same address same regex) const [poolToRename]: any[] = await DB.query(` SELECT * FROM pools diff --git a/backend/src/index.ts b/backend/src/index.ts index cad675e27..a81275066 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -105,7 +105,9 @@ class Server { .use(express.text({ type: ['text/plain', 'application/base64'] })) ; - await priceUpdater.$initializeLatestPriceWithDb(); + if (config.DATABASE.ENABLED) { + await priceUpdater.$initializeLatestPriceWithDb(); + } this.server = http.createServer(this.app); this.wss = new WebSocket.Server({ server: this.server });