diff --git a/dist/src/utils/config.js b/dist/src/utils/config.js index f8094ae57..28db27163 100644 --- a/dist/src/utils/config.js +++ b/dist/src/utils/config.js @@ -14,6 +14,8 @@ function loadConfig() { logging: logg || 'LIGHTNING,TRIBES,MEME,NOTIFICATION,EXPRESS,NETWORK,DB', senza_url: ENV.SENZA_URL || config.senza_url, macaroon_location: ENV.MACAROON_LOCATION || config.macaroon_location, + router_macaroon_location: ENV.ROUTER_MACAROON_LOCATION || config.router_macaroon_location, + signer_macaroon_location: ENV.SIGNER_MACAROON_LOCATION || config.signer_macaroon_location, tls_location: ENV.TLS_LOCATION || config.tls_location, lnd_log_location: ENV.LND_LOG_LOCATION || config.lnd_log_location, node_ip: ENV.NODE_IP || config.node_ip, diff --git a/dist/src/utils/config.js.map b/dist/src/utils/config.js.map index c458028d5..d3233da42 100644 --- a/dist/src/utils/config.js.map +++ b/dist/src/utils/config.js.map @@ -1 +1 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAC5B,qCAAqC;AAErC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7C,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAA;AAE5F,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AAEvB,SAAgB,UAAU;IACxB,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAA;IAC1C,OAAO;QACL,OAAO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AAE,GAAG,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe;QAC9D,kBAAkB,EAAE,GAAG,CAAC,kBAAkB,IAAI,MAAM,CAAC,kBAAkB;QACvE,mBAAmB,EAAE,GAAG,CAAC,mBAAmB,IAAI,MAAM,CAAC,mBAAmB;QAC1E,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO;KACvC,CAAA;AACH,CAAC;AA/CD,gCA+CC"} \ No newline at end of file diff --git a/dist/src/utils/macaroon.js b/dist/src/utils/macaroon.js index d87a1451d..a06219713 100644 --- a/dist/src/utils/macaroon.js +++ b/dist/src/utils/macaroon.js @@ -12,7 +12,8 @@ function getMacaroon(macName) { else { let macLocation = config.macaroon_location; if (macName) { - macLocation = macLocation.replace(/admin.macaroon/, macName); + const location = config[`${macName.split('.')[0]}_macaroon_location`]; + macLocation = location || macLocation.replace('admin.macaroon', macName); } const m = fs.readFileSync(macLocation); return m.toString('hex'); diff --git a/dist/src/utils/macaroon.js.map b/dist/src/utils/macaroon.js.map index fc19fcb2d..992f74cb4 100644 --- a/dist/src/utils/macaroon.js.map +++ b/dist/src/utils/macaroon.js.map @@ -1 +1 @@ -{"version":3,"file":"macaroon.js","sourceRoot":"","sources":["../../../src/utils/macaroon.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AACxB,qCAAmC;AAEnC,MAAM,MAAM,GAAG,mBAAU,EAAE,CAAA;AAE3B,IAAI,gBAAgB,GAAW,EAAE,CAAC,CAAC,cAAc;AAEjD,SAAgB,WAAW,CAAC,OAAe;IACzC,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,OAAO,gBAAgB,CAAA;KACxB;SAAM;QACL,IAAI,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAA;QAC1C,IAAG,OAAO,EAAE;YACV,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;SAC7D;QACD,MAAM,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QACtC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;KAC1B;AACH,CAAC;AAXD,kCAWC;AAED,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,gBAAgB,GAAG,GAAG,CAAA;AACxB,CAAC;AAFD,kDAEC"} \ No newline at end of file +{"version":3,"file":"macaroon.js","sourceRoot":"","sources":["../../../src/utils/macaroon.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AACxB,qCAAmC;AAEnC,MAAM,MAAM,GAAG,mBAAU,EAAE,CAAA;AAE3B,IAAI,gBAAgB,GAAW,EAAE,CAAC,CAAC,cAAc;AAEjD,SAAgB,WAAW,CAAC,OAAe;IACzC,IAAI,MAAM,CAAC,MAAM,EAAE;QACjB,OAAO,gBAAgB,CAAA;KACxB;SAAM;QACL,IAAI,WAAW,GAAG,MAAM,CAAC,iBAAiB,CAAA;QAC1C,IAAI,OAAO,EAAE;YACX,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAA;YACrE,WAAW,GAAG,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAA;SACzE;QACD,MAAM,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QACtC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;KAC1B;AACH,CAAC;AAZD,kCAYC;AAED,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,gBAAgB,GAAG,GAAG,CAAA;AACxB,CAAC;AAFD,kDAEC"} \ No newline at end of file