Skip to content

Commit 01e5f0c

Browse files
Fix Linting
1 parent f24521c commit 01e5f0c

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

apps/backend/source/service/lightning.service.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
APP_CONSTANTS,
99
AppConnect,
1010
LN_MESSAGE_CONFIG,
11-
REST_CONFIG
11+
REST_CONFIG,
1212
} from '../shared/consts.js';
1313
import { logger } from '../shared/logger.js';
1414
import { setEnvVariables, validateEnvVariables } from '../shared/utils.js';
@@ -45,7 +45,10 @@ export class LightningService {
4545
break;
4646
case AppConnect.GRPC:
4747
this.clnService = null;
48-
throw new ValidationError(HttpStatusCode.INVALID_DATA, 'gRPC connection to the Lightning node is not supported. Please use the COMMANDO or REST options for APP_CONNECT.');
48+
throw new ValidationError(
49+
HttpStatusCode.INVALID_DATA,
50+
'gRPC connection to the Lightning node is not supported. Please use the COMMANDO or REST options for APP_CONNECT.',
51+
);
4952
// logger.info('GRPC connecting with config: ' + JSON.stringify(GRPC_CONFIG));
5053
// this.clnService = new GRPCService(GRPC_CONFIG);
5154
break;
@@ -71,8 +74,13 @@ export class LightningService {
7174
return axios
7275
.post(method, methodParams, this.axiosConfig)
7376
.then((commandRes: any) => {
74-
logger.info('REST response for ' + method + ': ' + JSON.stringify(commandRes.data));
75-
return Promise.resolve(commandRes.data);
77+
logger.info(
78+
'REST response for ' +
79+
method +
80+
': ' +
81+
JSON.stringify(commandRes.data || commandRes.rows),
82+
);
83+
return Promise.resolve(commandRes.data || commandRes.rows);
7684
})
7785
.catch((err: any) => {
7886
logger.error('REST lightning error from ' + method + ' command');

apps/backend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
"lib": ["ES2022"]
1616
},
1717
"files": ["./source/server.ts"],
18-
"include": ["./source/**/*.d.ts"]
18+
"include": ["./source/**/*.ts"]
1919
}

0 commit comments

Comments
 (0)