Compare commits
6 Commits
v2.5.0-dev
...
v2.5.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab0f8726f5 | ||
|
|
13d639af9f | ||
|
|
d337bf3ee2 | ||
|
|
758e4d4f4c | ||
|
|
cd2bda4b49 | ||
|
|
493ea0641d |
@@ -4,21 +4,29 @@ import * as fs from 'fs';
|
||||
import { AbstractLightningApi } from '../lightning-api-abstract-factory';
|
||||
import { ILightningApi } from '../lightning-api.interface';
|
||||
import config from '../../../config';
|
||||
import logger from '../../../logger';
|
||||
|
||||
class LndApi implements AbstractLightningApi {
|
||||
axiosConfig: AxiosRequestConfig = {};
|
||||
|
||||
constructor() {
|
||||
if (config.LIGHTNING.ENABLED) {
|
||||
if (!config.LIGHTNING.ENABLED) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
this.axiosConfig = {
|
||||
headers: {
|
||||
'Grpc-Metadata-macaroon': fs.readFileSync(config.LND.MACAROON_PATH).toString('hex')
|
||||
'Grpc-Metadata-macaroon': fs.readFileSync(config.LND.MACAROON_PATH).toString('hex'),
|
||||
},
|
||||
httpsAgent: new Agent({
|
||||
ca: fs.readFileSync(config.LND.TLS_CERT_PATH)
|
||||
}),
|
||||
timeout: config.LND.TIMEOUT
|
||||
};
|
||||
} catch (e) {
|
||||
config.LIGHTNING.ENABLED = false;
|
||||
logger.updateNetwork();
|
||||
logger.err(`Could not initialize LND Macaroon/TLS Cert. Disabling LIGHTNING. ` + (e instanceof Error ? e.message : e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,10 @@ class Logger {
|
||||
this.network = this.getNetwork();
|
||||
}
|
||||
|
||||
public updateNetwork(): void {
|
||||
this.network = this.getNetwork();
|
||||
}
|
||||
|
||||
private addprio(prio): void {
|
||||
this[prio] = (function(_this) {
|
||||
return function(msg, tag?: string) {
|
||||
|
||||
@@ -10,6 +10,10 @@ cp /etc/nginx/nginx.conf /patch/nginx.conf
|
||||
sed -i "s/__MEMPOOL_FRONTEND_HTTP_PORT__/${__MEMPOOL_FRONTEND_HTTP_PORT__}/g" /patch/nginx.conf
|
||||
cat /patch/nginx.conf > /etc/nginx/nginx.conf
|
||||
|
||||
if [ "${LIGHTNING_DETECTED_PORT}" = "9735" ];then
|
||||
export LIGHTNING=true
|
||||
fi
|
||||
|
||||
# Runtime overrides - read env vars defined in docker compose
|
||||
|
||||
__TESTNET_ENABLED__=${TESTNET_ENABLED:=false}
|
||||
|
||||
@@ -7070,7 +7070,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="date-base.week" datatype="html">
|
||||
<source><x id="DATE" equiv-text="counter"/> week</source>
|
||||
<target><x id="DATE" equiv-text="counter"/> неделя</target>
|
||||
<target><x id="DATE" equiv-text="counter"/> неделю</target>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/shared/i18n/dates.ts</context>
|
||||
<context context-type="linenumber">7</context>
|
||||
@@ -7078,7 +7078,7 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="date-base.weeks" datatype="html">
|
||||
<source><x id="DATE" equiv-text="counter"/> weeks</source>
|
||||
<target><x id="DATE" equiv-text="counter"/> недель</target>
|
||||
<target><x id="DATE" equiv-text="counter"/> недели</target>
|
||||
<context-group purpose="location">
|
||||
<context context-type="sourcefile">src/app/shared/i18n/dates.ts</context>
|
||||
<context context-type="linenumber">8</context>
|
||||
|
||||
Reference in New Issue
Block a user