From 5379ec0f308c31dc2d017b914101523d491b58d6 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Tue, 10 Jan 2023 21:54:34 -0800 Subject: [PATCH] Expose whether Lightning is enabled on the backend --- backend/src/api/backend-info.ts | 4 +++- backend/src/mempool.interfaces.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/api/backend-info.ts b/backend/src/api/backend-info.ts index 57bb5fe13..fc3181524 100644 --- a/backend/src/api/backend-info.ts +++ b/backend/src/api/backend-info.ts @@ -2,6 +2,7 @@ import fs from 'fs'; import path from 'path'; import os from 'os'; import { IBackendInfo } from '../mempool.interfaces'; +import config from '../config'; class BackendInfo { private backendInfo: IBackendInfo; @@ -22,7 +23,8 @@ class BackendInfo { this.backendInfo = { hostname: os.hostname(), version: versionInfo.version, - gitCommit: versionInfo.gitCommit + gitCommit: versionInfo.gitCommit, + lightning: config.LIGHTNING.ENABLED }; } diff --git a/backend/src/mempool.interfaces.ts b/backend/src/mempool.interfaces.ts index 046083322..f79786279 100644 --- a/backend/src/mempool.interfaces.ts +++ b/backend/src/mempool.interfaces.ts @@ -274,6 +274,7 @@ export interface IBackendInfo { hostname: string; gitCommit: string; version: string; + lightning: boolean; } export interface IDifficultyAdjustment { @@ -337,4 +338,4 @@ export interface IOldestNodes { updatedAt?: number, city?: any, country?: any, -} \ No newline at end of file +}