diff --git a/backend/src/api/backend-info.ts b/backend/src/api/backend-info.ts index fc3181524..d4500a837 100644 --- a/backend/src/api/backend-info.ts +++ b/backend/src/api/backend-info.ts @@ -9,8 +9,8 @@ class BackendInfo { constructor() { // This file is created by ./fetch-version.ts during building - const versionFile = path.join(__dirname, 'version.json') - var versionInfo; + const versionFile = path.join(__dirname, 'version.json'); + let versionInfo; if (fs.existsSync(versionFile)) { versionInfo = JSON.parse(fs.readFileSync(versionFile).toString()); } else { @@ -24,7 +24,8 @@ class BackendInfo { hostname: os.hostname(), version: versionInfo.version, gitCommit: versionInfo.gitCommit, - lightning: config.LIGHTNING.ENABLED + lightning: config.LIGHTNING.ENABLED, + backend: config.MEMPOOL.BACKEND, }; } @@ -32,7 +33,7 @@ class BackendInfo { return this.backendInfo; } - public getShortCommitHash() { + public getShortCommitHash(): string { return this.backendInfo.gitCommit.slice(0, 7); } } diff --git a/backend/src/mempool.interfaces.ts b/backend/src/mempool.interfaces.ts index 5b31f13a6..dd23db8ab 100644 --- a/backend/src/mempool.interfaces.ts +++ b/backend/src/mempool.interfaces.ts @@ -455,6 +455,7 @@ export interface IBackendInfo { gitCommit: string; version: string; lightning: boolean; + backend: 'esplora' | 'electrum' | 'none'; } export interface IDifficultyAdjustment {