Unannounced Channel Configuration #1036

This commit is contained in:
ShahanaFarooqui 2022-11-15 19:17:23 -08:00
parent 6ce2ae82c8
commit 2c113030b4
44 changed files with 216 additions and 109 deletions

1
.github/README.md vendored
View File

@ -104,6 +104,7 @@ Example RTL-Config.json:
"bitcoindConfigPath": "<Optional: path of bitcoind.conf path if available locally>",
"logLevel": "INFO",
"fiatConversion": false,
"unannouncedChannels": false,
"lnServerUrl": "<url for LND REST APIs for node #1 e.g. https://192.168.0.1:8080>",
"swapServerUrl": "<url for swap server REST APIs for the node. e.g. https://localhost:8081>",
"boltzServerUrl": "<url for boltz server REST APIs for the node. e.g. https://localhost:9003>"

View File

@ -35,6 +35,7 @@ parameters have `default` values for initial setup and can be updated after RTL
"logLevel": <logging levels, will log in accordance with the logLevel value provided, Allowed values ERROR, WARN, INFO, DEBUG>,
"fiatConversion": <parameter to turn fiat conversion off/on. Allowed values - true, false, default false, Required>,
"currencyUnit": "<Optional: Fiat current Unit for currency conversion, default 'USD' If fiatConversion is true, Required if fiatConversion is true>",
"unannouncedChannels": <parameter to turn off/on setting for opening announced Channels, default false, Optional>
"lnServerUrl": "<Service url for LND/Core Lightning REST APIs for the node, e.g. https://192.168.0.1:8080 OR https://192.168.0.1:3001 OR http://192.168.0.1:8080. Default 'https://localhost:8080', Required",
"swapServerUrl": "<Service url for swap server REST APIs for the node, e.g. https://localhost:8081, Optional>",
"boltzServerUrl": "<Service url for boltz server REST APIs for the node, e.g. https://localhost:9003, Optional>"

View File

@ -82,6 +82,7 @@ Ensure that the follow values are correct per your config:
"bitcoindConfigPath": "",
"logLevel": "INFO",
"fiatConversion": false,
"unannouncedChannels": false,
"lnServerUrl": "https://<cl-rest api server ip address>:3001"
}
}

View File

@ -77,6 +77,7 @@ Ensure that the follow values are correct per your config:
"bitcoindConfigPath": "",
"logLevel": "INFO",
"fiatConversion": false,
"unannouncedChannels": false,
"lnServerUrl": "http://<eclair api server ip address>:port"
}
}

View File

@ -39,6 +39,7 @@ If your running RTL and LND on different devices on your local LAN, certain conf
"bitcoindConfigPath": "<Optional: path of bitcoind.conf path if available locally>",
"logLevel": "INFO",
"fiatConversion": false,
"unannouncedChannels": false,
"lnServerUrl": "<https://<ip-address-of-device-running-lnd>:8080; e.g. https://192.168.0.1:8080>",
"swapServerUrl": "<https://<localhost>:8081>",
"boltzServerUrl": "<https://<localhost>:9003>"

View File

@ -27,7 +27,8 @@
"lnServerUrl": "https://localhost:8080",
"swapServerUrl": "https://localhost:8081",
"boltzServerUrl": "https://localhost:9003",
"fiatConversion": false
"fiatConversion": false,
"unannouncedChannels": false
}
}
]

View File

@ -49,10 +49,11 @@ export const getRTLConfigInitial = (req, res, next) => {
const nodesArr = [];
if (common.nodes && common.nodes.length > 0) {
common.nodes.forEach((node, i) => {
const settings = {};
const settings = { unannouncedChannels: false };
settings.userPersona = node.user_persona ? node.user_persona : 'MERCHANT';
settings.themeMode = (node.theme_mode) ? node.theme_mode : 'DAY';
settings.themeColor = (node.theme_color) ? node.theme_color : 'PURPLE';
settings.unannouncedChannels = !!node.unannounced_channels || false;
settings.fiatConversion = (node.fiat_conversion) ? !!node.fiat_conversion : false;
settings.currencyUnit = node.currency_unit;
nodesArr.push({
@ -97,10 +98,11 @@ export const getRTLConfig = (req, res, next) => {
authentication.configPath = (node.config_path) ? node.config_path : '';
authentication.swapMacaroonPath = (node.swap_macaroon_path) ? node.swap_macaroon_path : '';
authentication.boltzMacaroonPath = (node.boltz_macaroon_path) ? node.boltz_macaroon_path : '';
const settings = {};
const settings = { unannouncedChannels: false };
settings.userPersona = node.user_persona ? node.user_persona : 'MERCHANT';
settings.themeMode = (node.theme_mode) ? node.theme_mode : 'DAY';
settings.themeColor = (node.theme_color) ? node.theme_color : 'PURPLE';
settings.unannouncedChannels = !!node.unannounced_channels || false;
settings.fiatConversion = (node.fiat_conversion) ? !!node.fiat_conversion : false;
settings.bitcoindConfigPath = node.bitcoind_config_path;
settings.logLevel = node.log_level ? node.log_level : 'ERROR';
@ -135,6 +137,7 @@ export const updateUISettings = (req, res, next) => {
node.Settings.userPersona = req.body.updatedSettings.userPersona;
node.Settings.themeMode = req.body.updatedSettings.themeMode;
node.Settings.themeColor = req.body.updatedSettings.themeColor;
node.Settings.unannouncedChannels = req.body.updatedSettings.unannouncedChannels;
node.Settings.fiatConversion = req.body.updatedSettings.fiatConversion;
if (req.body.updatedSettings.fiatConversion) {
node.Settings.currencyUnit = req.body.updatedSettings.currencyUnit ? req.body.updatedSettings.currencyUnit : 'USD';
@ -146,6 +149,7 @@ export const updateUISettings = (req, res, next) => {
selectedNode.user_persona = req.body.updatedSettings.userPersona;
selectedNode.theme_mode = req.body.updatedSettings.themeMode;
selectedNode.theme_color = req.body.updatedSettings.themeColor;
selectedNode.unannounced_channels = req.body.updatedSettings.unannouncedChannels;
selectedNode.fiat_conversion = req.body.updatedSettings.fiatConversion;
if (req.body.updatedSettings.fiatConversion) {
selectedNode.currency_unit = req.body.updatedSettings.currencyUnit ? req.body.updatedSettings.currencyUnit : 'USD';

View File

@ -1,5 +1,5 @@
export class CommonSelectedNode {
constructor(options, ln_server_url, macaroon_path, ln_api_password, swap_server_url, boltz_server_url, config_path, rtl_conf_file_path, swap_macaroon_path, boltz_macaroon_path, bitcoind_config_path, channel_backup_path, log_level, log_file, index, ln_node, ln_implementation, user_persona, theme_mode, theme_color, fiat_conversion, currency_unit, ln_version, api_version, enable_offers, enable_peerswap) {
constructor(options, ln_server_url, macaroon_path, ln_api_password, swap_server_url, boltz_server_url, config_path, rtl_conf_file_path, swap_macaroon_path, boltz_macaroon_path, bitcoind_config_path, channel_backup_path, log_level, log_file, index, ln_node, ln_implementation, user_persona, theme_mode, theme_color, unannounced_channels, fiat_conversion, currency_unit, ln_version, api_version, enable_offers, enable_peerswap) {
this.options = options;
this.ln_server_url = ln_server_url;
this.macaroon_path = macaroon_path;
@ -20,6 +20,7 @@ export class CommonSelectedNode {
this.user_persona = user_persona;
this.theme_mode = theme_mode;
this.theme_color = theme_color;
this.unannounced_channels = unannounced_channels;
this.fiat_conversion = fiat_conversion;
this.currency_unit = currency_unit;
this.ln_version = ln_version;
@ -36,10 +37,11 @@ export class AuthenticationConfiguration {
}
}
export class NodeSettingsConfiguration {
constructor(userPersona, themeMode, themeColor, fiatConversion, currencyUnit, bitcoindConfigPath, logLevel, lnServerUrl, swapServerUrl, boltzServerUrl, channelBackupPath, enableOffers, enablePeerswap) {
constructor(userPersona, themeMode, themeColor, unannouncedChannels, fiatConversion, currencyUnit, bitcoindConfigPath, logLevel, lnServerUrl, swapServerUrl, boltzServerUrl, channelBackupPath, enableOffers, enablePeerswap) {
this.userPersona = userPersona;
this.themeMode = themeMode;
this.themeColor = themeColor;
this.unannouncedChannels = unannouncedChannels;
this.fiatConversion = fiatConversion;
this.currencyUnit = currencyUnit;
this.bitcoindConfigPath = bitcoindConfigPath;

View File

@ -66,7 +66,8 @@ export class ConfigService {
channelBackupPath: channelBackupPath,
logLevel: 'ERROR',
lnServerUrl: 'https://localhost:8080',
fiatConversion: false
fiatConversion: false,
unannouncedChannels: false
}
}
]
@ -211,6 +212,7 @@ export class ConfigService {
this.common.nodes[idx].user_persona = node.Settings.userPersona ? node.Settings.userPersona : 'MERCHANT';
this.common.nodes[idx].theme_mode = node.Settings.themeMode ? node.Settings.themeMode : 'DAY';
this.common.nodes[idx].theme_color = node.Settings.themeColor ? node.Settings.themeColor : 'PURPLE';
this.common.nodes[idx].unannounced_channels = node.Settings.unannouncedChannels ? !!node.Settings.unannouncedChannels : false;
this.common.nodes[idx].log_level = node.Settings.logLevel ? node.Settings.logLevel : 'ERROR';
this.common.nodes[idx].fiat_conversion = node.Settings.fiatConversion ? !!node.Settings.fiatConversion : false;
if (this.common.nodes[idx].fiat_conversion) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,6 @@
<style>@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:62.5%}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}</style><link rel="stylesheet" href="styles.74a7770ce3bccfdd.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.74a7770ce3bccfdd.css"></noscript></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.8accbd66761d3c50.js" type="module"></script><script src="polyfills.eddc63f1737a019a.js" type="module"></script><script src="main.396512b45979b205.js" type="module"></script>
<script src="runtime.aa2ea472e0db94a2.js" type="module"></script><script src="polyfills.eddc63f1737a019a.js" type="module"></script><script src="main.83a29930fbd43097.js" type="module"></script>
</body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,f,o]=e[i],s=!0,u=0;u<t.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every(b=>r.O[b](t[u]))?t.splice(u--,1):(s=!1,o<a&&(a=o));if(s){e.splice(i--,1);var d=f();void 0!==d&&(n=d)}}return n}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{258:"ef3ed2ac7b618a48",267:"a6037bebc6ac269d",564:"60b2e807d9c1f809",636:"6791afade72241e7"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,o,i)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),d=0;d<u.length;d++){var l=u[d];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==n+o){a=l;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[f];var c=(m,b)=>{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)o.push(i[2]);else if(666!=f){var a=new Promise((l,c)=>i=e[f]=[l,c]);o.push(i[2]=a);var s=r.p+r.u(f),u=new Error;r.l(s,l=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;u.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",u.name="ChunkLoadError",u.type=c,u.request=p,i[1](u)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var u,d,[i,a,s]=o,l=0;if(i.some(p=>0!==e[p])){for(u in a)r.o(a,u)&&(r.m[u]=a[u]);if(s)var c=s(r)}for(f&&f(o);l<i.length;l++)r.o(e,d=i[l])&&e[d]&&e[d][0](),e[d]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,d)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,f,d]=e[i],s=!0,o=0;o<t.length;o++)(!1&d||a>=d)&&Object.keys(r.O).every(b=>r.O[b](t[o]))?t.splice(o--,1):(s=!1,d<a&&(a=d));if(s){e.splice(i--,1);var l=f();void 0!==l&&(n=l)}}return n}d=d||0;for(var i=e.length;i>0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[t,f,d]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{258:"0bf5d5ca65f9938d",267:"a6037bebc6ac269d",564:"d84a813af2911cfa",636:"8b697e4506ac5c7b"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,d,i)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==d)for(var o=document.getElementsByTagName("script"),l=0;l<o.length;l++){var u=o[l];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+d){a=u;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+d),a.src=r.tu(t)),e[t]=[f];var c=(m,b)=>{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,d)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)d.push(i[2]);else if(666!=f){var a=new Promise((u,c)=>i=e[f]=[u,c]);d.push(i[2]=a);var s=r.p+r.u(f),o=new Error;r.l(s,u=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var c=u&&("load"===u.type?"missing":u.type),p=u&&u.target&&u.target.src;o.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",o.name="ChunkLoadError",o.type=c,o.request=p,i[1](o)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,d)=>{var o,l,[i,a,s]=d,u=0;if(i.some(p=>0!==e[p])){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var c=s(r)}for(f&&f(d);u<i.length;u++)r.o(e,l=i[u])&&e[l]&&e[l][0](),e[l]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();

View File

@ -51,10 +51,11 @@ export const getRTLConfigInitial = (req, res, next) => {
const nodesArr = [];
if (common.nodes && common.nodes.length > 0) {
common.nodes.forEach((node, i) => {
const settings: NodeSettingsConfiguration = {};
const settings: NodeSettingsConfiguration = { unannouncedChannels: false };
settings.userPersona = node.user_persona ? node.user_persona : 'MERCHANT';
settings.themeMode = (node.theme_mode) ? node.theme_mode : 'DAY';
settings.themeColor = (node.theme_color) ? node.theme_color : 'PURPLE';
settings.unannouncedChannels = !!node.unannounced_channels || false;
settings.fiatConversion = (node.fiat_conversion) ? !!node.fiat_conversion : false;
settings.currencyUnit = node.currency_unit;
nodesArr.push({
@ -98,10 +99,11 @@ export const getRTLConfig = (req, res, next) => {
authentication.configPath = (node.config_path) ? node.config_path : '';
authentication.swapMacaroonPath = (node.swap_macaroon_path) ? node.swap_macaroon_path : '';
authentication.boltzMacaroonPath = (node.boltz_macaroon_path) ? node.boltz_macaroon_path : '';
const settings: NodeSettingsConfiguration = {};
const settings: NodeSettingsConfiguration = { unannouncedChannels: false };
settings.userPersona = node.user_persona ? node.user_persona : 'MERCHANT';
settings.themeMode = (node.theme_mode) ? node.theme_mode : 'DAY';
settings.themeColor = (node.theme_color) ? node.theme_color : 'PURPLE';
settings.unannouncedChannels = !!node.unannounced_channels || false;
settings.fiatConversion = (node.fiat_conversion) ? !!node.fiat_conversion : false;
settings.bitcoindConfigPath = node.bitcoind_config_path;
settings.logLevel = node.log_level ? node.log_level : 'ERROR';
@ -137,6 +139,7 @@ export const updateUISettings = (req, res, next) => {
node.Settings.userPersona = req.body.updatedSettings.userPersona;
node.Settings.themeMode = req.body.updatedSettings.themeMode;
node.Settings.themeColor = req.body.updatedSettings.themeColor;
node.Settings.unannouncedChannels = req.body.updatedSettings.unannouncedChannels;
node.Settings.fiatConversion = req.body.updatedSettings.fiatConversion;
if (req.body.updatedSettings.fiatConversion) {
node.Settings.currencyUnit = req.body.updatedSettings.currencyUnit ? req.body.updatedSettings.currencyUnit : 'USD';
@ -147,6 +150,7 @@ export const updateUISettings = (req, res, next) => {
selectedNode.user_persona = req.body.updatedSettings.userPersona;
selectedNode.theme_mode = req.body.updatedSettings.themeMode;
selectedNode.theme_color = req.body.updatedSettings.themeColor;
selectedNode.unannounced_channels = req.body.updatedSettings.unannouncedChannels;
selectedNode.fiat_conversion = req.body.updatedSettings.fiatConversion;
if (req.body.updatedSettings.fiatConversion) {
selectedNode.currency_unit = req.body.updatedSettings.currencyUnit ? req.body.updatedSettings.currencyUnit : 'USD';

View File

@ -21,6 +21,7 @@ export class CommonSelectedNode {
public user_persona?: string,
public theme_mode?: string,
public theme_color?: string,
public unannounced_channels?: boolean,
public fiat_conversion?: boolean,
public currency_unit?: string,
public ln_version?: string,
@ -47,6 +48,7 @@ export class NodeSettingsConfiguration {
public userPersona?: string,
public themeMode?: string,
public themeColor?: string,
public unannouncedChannels?: boolean,
public fiatConversion?: boolean,
public currencyUnit?: string,
public bitcoindConfigPath?: string,

View File

@ -70,7 +70,8 @@ export class ConfigService {
channelBackupPath: channelBackupPath,
logLevel: 'ERROR',
lnServerUrl: 'https://localhost:8080',
fiatConversion: false
fiatConversion: false,
unannouncedChannels: false
}
}
]
@ -200,6 +201,7 @@ export class ConfigService {
this.common.nodes[idx].user_persona = node.Settings.userPersona ? node.Settings.userPersona : 'MERCHANT';
this.common.nodes[idx].theme_mode = node.Settings.themeMode ? node.Settings.themeMode : 'DAY';
this.common.nodes[idx].theme_color = node.Settings.themeColor ? node.Settings.themeColor : 'PURPLE';
this.common.nodes[idx].unannounced_channels = node.Settings.unannouncedChannels ? !!node.Settings.unannouncedChannels : false;
this.common.nodes[idx].log_level = node.Settings.logLevel ? node.Settings.logLevel : 'ERROR';
this.common.nodes[idx].fiat_conversion = node.Settings.fiatConversion ? !!node.Settings.fiatConversion : false;
if (this.common.nodes[idx].fiat_conversion) {

View File

@ -37,8 +37,8 @@ export const routes: Routes = [
},
{
path: 'config', component: NodeConfigComponent, canActivate: [AuthGuard], children: [
{ path: '', pathMatch: 'full', redirectTo: 'applayout' },
{ path: 'applayout', component: NodeSettingsComponent, canActivate: [AuthGuard] },
{ path: '', pathMatch: 'full', redirectTo: 'nodelayout' },
{ path: 'nodelayout', component: NodeSettingsComponent, canActivate: [AuthGuard] },
{ path: 'pglayout', component: PageSettingsComponent, canActivate: [AuthGuard] },
{
path: 'services', component: ServicesSettingsComponent, canActivate: [AuthGuard], children: [

View File

@ -15,6 +15,8 @@ import { APICallStatusEnum, CLNActions, FEE_RATE_TYPES, ScreenSizeEnum } from '.
import { RTLState } from '../../../../store/rtl.state';
import { saveNewChannel } from '../../../store/cln.actions';
import { clnNodeSettings } from '../../../store/cln.selector';
import { SelNodeChild } from '../../../../shared/models/RTLconfig';
@Component({
selector: 'rtl-cln-open-channel',
@ -28,6 +30,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
public faExclamationTriangle = faExclamationTriangle;
public alertTitle: string;
public isCompatibleVersion = false;
public selNode: SelNodeChild | null = {};
public peer: Peer | null;
public peers: Peer[];
public sortedPeers: Peer[];
@ -50,7 +53,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
public minConfValue = null;
public screenSize = '';
public screenSizeEnum = ScreenSizeEnum;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(public dialogRef: MatDialogRef<CLNOpenChannelComponent>, @Inject(MAT_DIALOG_DATA) public data: CLNOpenChannelAlert, private store: Store<RTLState>, private actions: Actions, private decimalPipe: DecimalPipe, private commonService: CommonService) {
this.screenSize = this.commonService.getScreenSize();
@ -73,8 +76,13 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
this.peers = [];
}
this.alertTitle = this.data.alertTitle || 'Alert';
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.isPrivate = !!nodeSettings?.unannouncedChannels;
});
this.actions.pipe(
takeUntil(this.unSubs[0]),
takeUntil(this.unSubs[1]),
filter((action) => action.type === CLNActions.UPDATE_API_CALL_STATUS_CLN || action.type === CLNActions.FETCH_CHANNELS_CLN)).
subscribe((action: any) => {
if (action.type === CLNActions.UPDATE_API_CALL_STATUS_CLN && action.payload.status === APICallStatusEnum.ERROR && action.payload.action === 'SaveNewChannel') {
@ -91,7 +99,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
y = p2.alias ? p2.alias.toLowerCase() : p1.id ? p1.id.toLowerCase() : '';
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
});
this.filteredPeers = this.selectedPeer.valueChanges.pipe(takeUntil(this.unSubs[1]), startWith(''),
this.filteredPeers = this.selectedPeer.valueChanges.pipe(takeUntil(this.unSubs[2]), startWith(''),
map((peer) => (typeof peer === 'string' ? peer : peer.alias ? peer.alias : peer.id)),
map((alias) => (alias ? this.filterPeers(alias) : this.sortedPeers.slice()))
);
@ -131,7 +139,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
this.minConfValue = null;
this.selectedPeer.setValue('');
this.fundingAmount = null;
this.isPrivate = false;
this.isPrivate = !!this.selNode?.unannouncedChannels;
this.channelConnectionError = '';
this.advancedTitle = 'Advanced Options';
this.form.resetForm();

View File

@ -16,6 +16,8 @@ import { APICallStatusEnum, CLNActions, FEE_RATE_TYPES, ScreenSizeEnum } from '.
import { RTLState } from '../../../store/rtl.state';
import { saveNewChannel, saveNewPeer } from '../../store/cln.actions';
import { clnNodeSettings } from '../../store/cln.selector';
import { SelNodeChild } from '../../../shared/models/RTLconfig';
@Component({
selector: 'rtl-cln-connect-peer',
@ -27,6 +29,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
@ViewChild('peersForm', { static: false }) form: any;
@ViewChild('stepper', { static: false }) stepper: MatStepper;
public faExclamationTriangle = faExclamationTriangle;
public selNode: SelNodeChild | null = {};
public peerAddress = '';
public totalBalance = 0;
public feeRateTypes = FEE_RATE_TYPES;
@ -43,7 +46,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
peerFormGroup: FormGroup;
channelFormGroup: FormGroup;
statusFormGroup: FormGroup;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
constructor(public dialogRef: MatDialogRef<CLNConnectPeerComponent>, @Inject(MAT_DIALOG_DATA) public data: CLNOpenChannelAlert, private store: Store<RTLState>, private formBuilder: FormBuilder, private actions: Actions, private logger: LoggerService, private commonService: CommonService) {
this.screenSize = this.commonService.getScreenSize();
@ -64,7 +67,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
});
this.channelFormGroup = this.formBuilder.group({
fundingAmount: ['', [Validators.required, Validators.min(1), Validators.max(this.totalBalance)]],
isPrivate: [false],
isPrivate: [!!this.selNode?.unannouncedChannels],
selFeeRate: [null],
customFeeRate: [null],
flgMinConf: [false],
@ -72,7 +75,12 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
hiddenAmount: ['', [Validators.required]]
});
this.statusFormGroup = this.formBuilder.group({});
this.channelFormGroup.controls.flgMinConf.valueChanges.pipe(takeUntil(this.unSubs[0])).subscribe((flg) => {
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.channelFormGroup.controls.isPrivate.setValue(!!nodeSettings?.unannouncedChannels);
});
this.channelFormGroup.controls.flgMinConf.valueChanges.pipe(takeUntil(this.unSubs[1])).subscribe((flg) => {
if (flg) {
this.channelFormGroup.controls.selFeeRate.setValue(null);
this.channelFormGroup.controls.selFeeRate.disable();
@ -87,7 +95,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
this.channelFormGroup.controls.minConfValue.setValidators(null);
}
});
this.channelFormGroup.controls.selFeeRate.valueChanges.pipe(takeUntil(this.unSubs[1])).subscribe((feeRate) => {
this.channelFormGroup.controls.selFeeRate.valueChanges.pipe(takeUntil(this.unSubs[2])).subscribe((feeRate) => {
this.channelFormGroup.controls.customFeeRate.setValue(null);
this.channelFormGroup.controls.customFeeRate.reset();
if (feeRate === 'customperkb' && !this.channelFormGroup.controls.flgMinConf.value) {
@ -97,7 +105,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
}
});
this.actions.pipe(
takeUntil(this.unSubs[2]),
takeUntil(this.unSubs[3]),
filter((action) => action.type === CLNActions.NEWLY_ADDED_PEER_CLN || action.type === CLNActions.FETCH_CHANNELS_CLN || action.type === CLNActions.UPDATE_API_CALL_STATUS_CLN)).
subscribe((action: any) => {
if (action.type === CLNActions.NEWLY_ADDED_PEER_CLN) {

View File

@ -48,7 +48,7 @@ export const initCLNState: CLNState = {
FetchOffers: { status: APICallStatusEnum.UN_INITIATED },
FetchOfferBookmarks: { status: APICallStatusEnum.UN_INITIATED }
},
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [], enableOffers: false, enablePeerswap: false },
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, unannouncedChannels: false, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [], enableOffers: false, enablePeerswap: false },
pageSettings: CLN_DEFAULT_PAGE_SETTINGS,
information: {},
fees: {},

View File

@ -13,6 +13,8 @@ import { ECLOpenChannelAlert } from '../../../../shared/models/alertData';
import { RTLState } from '../../../../store/rtl.state';
import { saveNewChannel } from '../../../store/ecl.actions';
import { SelNodeChild } from '../../../../shared/models/RTLconfig';
import { eclNodeSettings } from '../../../store/ecl.selector';
@Component({
selector: 'rtl-ecl-open-channel',
@ -22,6 +24,7 @@ import { saveNewChannel } from '../../../store/ecl.actions';
export class ECLOpenChannelComponent implements OnInit, OnDestroy {
@ViewChild('form', { static: true }) form: any;
public selNode: SelNodeChild | null = {};
public selectedPeer = new FormControl();
public faExclamationTriangle = faExclamationTriangle;
public alertTitle: string;
@ -38,7 +41,7 @@ export class ECLOpenChannelComponent implements OnInit, OnDestroy {
public isPrivate = false;
public feeRate: number | null = null;
public selChannelType: any = null;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(public dialogRef: MatDialogRef<ECLOpenChannelComponent>, @Inject(MAT_DIALOG_DATA) public data: ECLOpenChannelAlert, private store: Store<RTLState>, private actions: Actions) { }
@ -55,8 +58,13 @@ export class ECLOpenChannelComponent implements OnInit, OnDestroy {
this.peers = [];
}
this.alertTitle = this.data.alertTitle || 'Alert';
this.store.select(eclNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.isPrivate = !!nodeSettings?.unannouncedChannels;
});
this.actions.pipe(
takeUntil(this.unSubs[0]),
takeUntil(this.unSubs[1]),
filter((action) => action.type === ECLActions.UPDATE_API_CALL_STATUS_ECL || action.type === ECLActions.FETCH_CHANNELS_ECL)).
subscribe((action: any) => {
if (action.type === ECLActions.UPDATE_API_CALL_STATUS_ECL && action.payload.status === APICallStatusEnum.ERROR && action.payload.action === 'SaveNewChannel') {
@ -74,7 +82,7 @@ export class ECLOpenChannelComponent implements OnInit, OnDestroy {
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
});
this.filteredPeers = this.selectedPeer.valueChanges.pipe(
takeUntil(this.unSubs[1]), startWith(''),
takeUntil(this.unSubs[2]), startWith(''),
map((peer) => (typeof peer === 'string' ? peer : peer.alias ? peer.alias : peer.nodeId)),
map((alias) => (alias ? this.filterPeers(alias) : this.sortedPeers.slice()))
);
@ -112,7 +120,7 @@ export class ECLOpenChannelComponent implements OnInit, OnDestroy {
this.feeRate = null;
this.selectedPeer.setValue('');
this.fundingAmount = null;
this.isPrivate = false;
this.isPrivate = !!this.selNode?.unannouncedChannels;
this.channelConnectionError = '';
this.selChannelType = null;
this.advancedTitle = 'Advanced Options';

View File

@ -15,6 +15,8 @@ import { LoggerService } from '../../../shared/services/logger.service';
import { RTLState } from '../../../store/rtl.state';
import { saveNewChannel, saveNewPeer } from '../../store/ecl.actions';
import { eclNodeSettings } from '../../store/ecl.selector';
import { SelNodeChild } from '../../../shared/models/RTLconfig';
@Component({
selector: 'rtl-ecl-connect-peer',
@ -26,6 +28,7 @@ export class ECLConnectPeerComponent implements OnInit, OnDestroy {
@ViewChild('peersForm', { static: false }) form: any;
@ViewChild('stepper', { static: false }) stepper: MatStepper;
public faExclamationTriangle = faExclamationTriangle;
public selNode: SelNodeChild | null = {};
public peerAddress = '';
public totalBalance = 0;
public flgChannelOpened = false;
@ -58,12 +61,17 @@ export class ECLConnectPeerComponent implements OnInit, OnDestroy {
});
this.channelFormGroup = this.formBuilder.group({
fundingAmount: ['', [Validators.required, Validators.min(1), Validators.max(this.totalBalance)]],
isPrivate: [false],
isPrivate: [!!this.selNode?.unannouncedChannels],
feeRate: [null],
selChannelType: [null],
hiddenAmount: ['', [Validators.required]]
});
this.statusFormGroup = this.formBuilder.group({});
this.store.select(eclNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.channelFormGroup.controls.isPrivate.setValue(!!nodeSettings?.unannouncedChannels);
});
this.actions.pipe(
takeUntil(this.unSubs[1]),
filter((action) => action.type === ECLActions.NEWLY_ADDED_PEER_ECL || action.type === ECLActions.FETCH_CHANNELS_ECL || action.type === ECLActions.UPDATE_API_CALL_STATUS_ECL)).

View File

@ -34,7 +34,7 @@ export const initECLState: ECLState = {
FetchInvoices: { status: APICallStatusEnum.UN_INITIATED },
FetchTransactions: { status: APICallStatusEnum.UN_INITIATED }
},
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [] },
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, unannouncedChannels: false, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [] },
pageSettings: ECL_DEFAULT_PAGE_SETTINGS,
information: {},
fees: {},

View File

@ -19,10 +19,8 @@
</div>
<div>
<h4 class="dashboard-info-title">Chain</h4>
<span class="overflow-wrap dashboard-info-value" *ngFor="let chain of chains">
<span *ngIf="information?.synced_to_chain" class="dot green mr-1" matTooltip="Synced to Chain" matTooltipPosition="right"></span>
<span *ngIf="!information?.synced_to_chain" class="dot red mr-1" matTooltip="Not Synced to Chain" matTooltipPosition="right"></span>
{{chain}}
</span>
<span class="overflow-wrap dashboard-info-value" *ngFor="let chain of chains">{{chain}}</span>
</div>
</div>

View File

@ -13,6 +13,8 @@ import { APICallStatusEnum, LNDActions, TRANS_TYPES } from '../../../../shared/s
import { RTLState } from '../../../../store/rtl.state';
import { saveNewChannel } from '../../../store/lnd.actions';
import { SelNodeChild } from '../../../../shared/models/RTLconfig';
import { lndNodeSettings } from '../../../store/lnd.selector';
@Component({
selector: 'rtl-open-channel',
@ -23,6 +25,7 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
@ViewChild('form', { static: true }) form: any;
public selectedPeer = new FormControl();
public selNode: SelNodeChild | null = {};
public amount = new FormControl();
public faExclamationTriangle = faExclamationTriangle;
public alertTitle: string;
@ -41,7 +44,7 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
public spendUnconfirmed = false;
public transTypeValue = '';
public transTypes = TRANS_TYPES;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(public dialogRef: MatDialogRef<OpenChannelComponent>, @Inject(MAT_DIALOG_DATA) public data: OpenChannelAlert, private store: Store<RTLState>, private actions: Actions) { }
@ -58,8 +61,13 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
this.peers = [];
}
this.alertTitle = this.data.alertTitle || 'Alert';
this.store.select(lndNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.isPrivate = !!nodeSettings?.unannouncedChannels;
});
this.actions.pipe(
takeUntil(this.unSubs[0]),
takeUntil(this.unSubs[1]),
filter((action) => action.type === LNDActions.UPDATE_API_CALL_STATUS_LND || action.type === LNDActions.FETCH_CHANNELS_LND)).
subscribe((action: any) => {
if (action.type === LNDActions.UPDATE_API_CALL_STATUS_LND && action.payload.status === APICallStatusEnum.ERROR && action.payload.action === 'SaveNewChannel') {
@ -77,7 +85,7 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
});
this.filteredPeers = this.selectedPeer.valueChanges.pipe(
takeUntil(this.unSubs[1]), startWith(''),
takeUntil(this.unSubs[2]), startWith(''),
map((peer) => (typeof peer === 'string' ? peer : peer.alias ? peer.alias : peer.pub_key)),
map((alias) => (alias ? this.filterPeers(alias) : this.sortedPeers.slice()))
);
@ -114,7 +122,7 @@ export class OpenChannelComponent implements OnInit, OnDestroy {
resetData() {
this.selectedPeer.setValue('');
this.fundingAmount = null;
this.isPrivate = false;
this.isPrivate = !!this.selNode?.unannouncedChannels;
this.spendUnconfirmed = false;
this.selTransType = '0';
this.transTypeValue = '';

View File

@ -16,6 +16,8 @@ import { APICallStatusEnum, LNDActions, TRANS_TYPES } from '../../../shared/serv
import { LNDEffects } from '../../store/lnd.effects';
import { RTLState } from '../../../store/rtl.state';
import { fetchGraphNode, saveNewChannel, saveNewPeer } from '../../store/lnd.actions';
import { lndNodeSettings } from '../../store/lnd.selector';
import { SelNodeChild } from '../../../shared/models/RTLconfig';
@Component({
selector: 'rtl-connect-peer',
@ -27,6 +29,7 @@ export class ConnectPeerComponent implements OnInit, OnDestroy {
@ViewChild('peersForm', { static: false }) form: any;
@ViewChild('stepper', { static: false }) stepper: MatStepper;
public faExclamationTriangle = faExclamationTriangle;
public selNode: SelNodeChild | null = {};
public peerAddress = '';
public totalBalance = 0;
public transTypes = TRANS_TYPES;
@ -41,7 +44,7 @@ export class ConnectPeerComponent implements OnInit, OnDestroy {
peerFormGroup: FormGroup;
channelFormGroup: FormGroup;
statusFormGroup: FormGroup;
private unSubs: Array<Subject<void>> = [new Subject(), new Subject()];
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject()];
constructor(public dialogRef: MatDialogRef<ConnectPeerComponent>, @Inject(MAT_DIALOG_DATA) public data: OpenChannelAlert, private store: Store<RTLState>, private lndEffects: LNDEffects, private formBuilder: FormBuilder, private actions: Actions, private logger: LoggerService) { }
@ -53,14 +56,19 @@ export class ConnectPeerComponent implements OnInit, OnDestroy {
});
this.channelFormGroup = this.formBuilder.group({
fundingAmount: ['', [Validators.required, Validators.min(1), Validators.max(this.totalBalance)]],
isPrivate: [false],
isPrivate: [!!this.selNode?.unannouncedChannels],
selTransType: [TRANS_TYPES[0].id],
transTypeValue: [{ value: '', disabled: true }],
spendUnconfirmed: [false],
hiddenAmount: ['', [Validators.required]]
});
this.statusFormGroup = this.formBuilder.group({});
this.channelFormGroup.controls.selTransType.valueChanges.pipe(takeUntil(this.unSubs[0])).subscribe((transType) => {
this.store.select(lndNodeSettings).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: SelNodeChild | null) => {
this.selNode = nodeSettings;
this.channelFormGroup.controls.isPrivate.setValue(!!nodeSettings?.unannouncedChannels);
});
this.channelFormGroup.controls.selTransType.valueChanges.pipe(takeUntil(this.unSubs[1])).subscribe((transType) => {
if (transType === TRANS_TYPES[0].id) {
this.channelFormGroup.controls.transTypeValue.setValue('');
this.channelFormGroup.controls.transTypeValue.disable();
@ -73,7 +81,7 @@ export class ConnectPeerComponent implements OnInit, OnDestroy {
}
});
this.actions.pipe(
takeUntil(this.unSubs[1]),
takeUntil(this.unSubs[2]),
filter((action) => action.type === LNDActions.NEWLY_ADDED_PEER_LND || action.type === LNDActions.FETCH_PENDING_CHANNELS_LND || action.type === LNDActions.UPDATE_API_CALL_STATUS_LND)).
subscribe((action: any) => {
if (action.type === LNDActions.NEWLY_ADDED_PEER_LND) {

View File

@ -106,10 +106,11 @@ export class PeersComponent implements OnInit, AfterViewInit, OnDestroy {
}
onPeerClick(selPeer: Peer, event: any) {
// const encodedStr = encodeURIComponent('&#181;');
const reorderedPeer = [
[{ key: 'pub_key', value: selPeer.pub_key, title: 'Public Key', width: 100 }],
[{ key: 'address', value: selPeer.address, title: 'Address', width: 100 }],
[{ key: 'alias', value: selPeer.alias, title: 'Alias', width: 40 }, { key: 'inbound', value: selPeer.inbound ? 'True' : 'False', title: 'Inbound', width: 30 }, { key: 'ping_time', value: selPeer.ping_time, title: 'Ping Time', width: 30, type: DataTypeEnum.NUMBER }],
[{ key: 'alias', value: selPeer.alias, title: 'Alias', width: 40 }, { key: 'inbound', value: selPeer.inbound ? 'True' : 'False', title: 'Inbound', width: 30 }, { key: 'ping_time', value: selPeer.ping_time, title: 'Ping Time (\u00B5s)', width: 30, type: DataTypeEnum.NUMBER }],
[{ key: 'sat_sent', value: selPeer.sat_sent, title: 'Satoshis Sent', width: 50, type: DataTypeEnum.NUMBER }, { key: 'sat_recv', value: selPeer.sat_recv, title: 'Satoshis Received', width: 50, type: DataTypeEnum.NUMBER }],
[{ key: 'bytes_sent', value: selPeer.bytes_sent, title: 'Bytes Sent', width: 50, type: DataTypeEnum.NUMBER }, { key: 'bytes_recv', value: selPeer.bytes_recv, title: 'Bytes Received', width: 50, type: DataTypeEnum.NUMBER }]
];

View File

@ -45,7 +45,7 @@ export const initLNDState: LNDState = {
FetchLightningTransactions: { status: APICallStatusEnum.UN_INITIATED },
FetchNetwork: { status: APICallStatusEnum.UN_INITIATED }
},
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, fiatConversion: false, channelBackupPath: '', currencyUnits: [], selCurrencyUnit: '', lnImplementation: '', swapServerUrl: '' },
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, unannouncedChannels: false, fiatConversion: false, channelBackupPath: '', currencyUnits: [], selCurrencyUnit: '', lnImplementation: '', swapServerUrl: '' },
pageSettings: LND_DEFAULT_PAGE_SETTINGS,
information: {},
peers: [],

View File

@ -95,19 +95,19 @@ export class ExperimentalSettingsComponent implements OnInit, OnDestroy {
this.store.dispatch(setChildNodeSettingsLND({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsCL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsECL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.enableOffers
}
}));
}

View File

@ -23,7 +23,7 @@ export class NodeConfigComponent implements OnInit, OnDestroy {
public showLnConfig = false;
public selNode: ConfigSettingsNode | any;
public lnImplementationStr = '';
public links = [{ link: 'applayout', name: 'Application Layout' }, { link: 'pglayout', name: 'Page Layout' }, { link: 'services', name: 'Services' }, { link: 'experimental', name: 'Experimental' }, { link: 'lnconfig', name: this.lnImplementationStr }];
public links = [{ link: 'nodelayout', name: 'Application Layout' }, { link: 'pglayout', name: 'Page Layout' }, { link: 'services', name: 'Services' }, { link: 'experimental', name: 'Experimental' }, { link: 'lnconfig', name: this.lnImplementationStr }];
public activeLink = '';
private unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject()];

View File

@ -1,10 +1,31 @@
<div [perfectScrollbar] fxLayout="column" fxFlex="100">
<form fxLayout="column" fxLayoutAlign="start stretch" class="settings-container page-sub-title-container mt-1" #form="ngForm">
<div fxLayout="row">
<mat-accordion displayMode="flat" multi="false">
<mat-expansion-panel fxLayout="column" class="flat-expansion-panel mt-1">
<mat-expansion-panel-header>
<mat-panel-title>
<fa-icon [icon]="faEyeSlash" class="page-title-img mr-1"></fa-icon>
<span class="page-title">Open Unannounced Channels</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div fxLayout="column" fxLayoutAlign="start stretch">
<div fxLayout="row" fxFlex="100" class="alert alert-info mb-1">
<fa-icon [icon]="faInfoCircle" class="mr-1 alert-icon"></fa-icon>
<span>Use this control to toggle setting which defaults to opening Unannounced Channels.</span>
</div>
<div fxLayout="row wrap" fxLayoutAlign="start center">
<mat-slide-toggle tabindex="1" color="primary" [(ngModel)]="selNode.settings.unannouncedChannels" (change)="selNode.settings.unannouncedChannels = !$event.checked ? null : selNode.settings.unannouncedChannels" name="unannouncedChannels">Open Unannounced Channels</mat-slide-toggle>
</div>
</div>
</mat-expansion-panel>
<mat-expansion-panel fxLayout="column" class="flat-expansion-panel mt-1">
<mat-expansion-panel-header>
<mat-panel-title>
<fa-icon [icon]="faMoneyBillAlt" class="page-title-img mr-1"></fa-icon>
<span class="page-title">Balance Display</span>
</div>
<div fxLayout="column" fxLayoutAlign="start stretch" class="mt-1 bordered-box padding-gap-large">
</mat-panel-title>
</mat-expansion-panel-header>
<div fxLayout="column" fxLayoutAlign="start stretch">
<div fxFlex="100" class="alert alert-warn">
<fa-icon [icon]="faExclamationTriangle" class="mr-1 alert-icon"></fa-icon>
<span>Fiat conversion calls <strong><a href="https://www.blockchain.com/api/exchange_rates_api" target="blank">Blockchain.com</a></strong> API to get conversion rates.</span>
@ -21,13 +42,15 @@
</mat-form-field>
</div>
</div>
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch">
<div fxLayout="row wrap" fxLayoutAlign="start start" fxLayout.gt-sm="column" fxFlex="100" fxLayoutAlign.gt-sm="space-between stretch" class="settings-container page-sub-title-container mt-1">
<div class="mt-1">
</mat-expansion-panel>
<mat-expansion-panel fxLayout="column" class="flat-expansion-panel mt-1">
<mat-expansion-panel-header>
<mat-panel-title>
<fa-icon [icon]="faPaintBrush" class="page-title-img mr-1"></fa-icon>
<span class="page-title">Customization</span>
</div>
<div fxLayout="column" fxLayoutAlign="start stretch" class="mt-1 bordered-box padding-gap-large">
</mat-panel-title>
</mat-expansion-panel-header>
<div fxLayout="column" fxLayoutAlign="start stretch">
<div fxLayout="column" fxLayoutAlign="start stretch" fxFlex="100">
<div fxLayout="row" fxFlex="100" class="alert alert-info mb-0">
<fa-icon [icon]="faInfoCircle" class="mr-1 alert-icon"></fa-icon>
@ -65,8 +88,8 @@
</div>
</div>
</div>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</form>
<div fxLayout="row" class="mt-1">
<button class="mr-1" mat-stroked-button color="primary" (click)="onResetSettings()" tabindex="10">Reset</button>

View File

@ -2,7 +2,7 @@ import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { faMoneyBillAlt, faPaintBrush, faInfoCircle, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
import { faMoneyBillAlt, faPaintBrush, faInfoCircle, faExclamationTriangle, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
import { CURRENCY_UNITS, UserPersonaEnum, ScreenSizeEnum, FIAT_CURRENCY_UNITS, NODE_SETTINGS, UI_MESSAGES } from '../../../services/consts-enums-functions';
import { ConfigSettingsNode, Settings } from '../../../models/RTLconfig';
@ -26,6 +26,7 @@ export class NodeSettingsComponent implements OnInit, OnDestroy {
public faMoneyBillAlt = faMoneyBillAlt;
public faPaintBrush = faPaintBrush;
public faInfoCircle = faInfoCircle;
public faEyeSlash = faEyeSlash;
public selNode: ConfigSettingsNode | any;
public userPersonas = [UserPersonaEnum.OPERATOR, UserPersonaEnum.MERCHANT];
public currencyUnits = FIAT_CURRENCY_UNITS;
@ -62,22 +63,23 @@ export class NodeSettingsComponent implements OnInit, OnDestroy {
this.selNode.settings.currencyUnits = [...CURRENCY_UNITS, event.value];
this.store.dispatch(setChildNodeSettingsLND({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: event.value, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: event.value,
currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));
this.store.dispatch(setChildNodeSettingsCL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: event.value,
currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion, lnImplementation: this.selNode.lnImplementation,
swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));
this.store.dispatch(setChildNodeSettingsECL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: event.value,
currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion, lnImplementation: this.selNode.lnImplementation,
swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));
}
@ -105,7 +107,7 @@ export class NodeSettingsComponent implements OnInit, OnDestroy {
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath,
selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits,
fiatConversion: this.selNode.settings.fiatConversion, lnImplementation: this.selNode.lnImplementation,
fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation,
swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));
@ -113,7 +115,7 @@ export class NodeSettingsComponent implements OnInit, OnDestroy {
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath,
selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits,
fiatConversion: this.selNode.settings.fiatConversion, lnImplementation: this.selNode.lnImplementation,
fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation,
swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));
@ -121,7 +123,7 @@ export class NodeSettingsComponent implements OnInit, OnDestroy {
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath,
selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits,
fiatConversion: this.selNode.settings.fiatConversion, lnImplementation: this.selNode.lnImplementation,
fiatConversion: this.selNode.settings.fiatConversion, unannouncedChannels: this.selNode.settings.unannouncedChannels, lnImplementation: this.selNode.lnImplementation,
swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl
}
}));

View File

@ -73,19 +73,19 @@ export class BoltzServiceSettingsComponent implements OnInit, OnDestroy {
this.store.dispatch(setChildNodeSettingsLND({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsCL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsECL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.serverUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
}

View File

@ -61,19 +61,19 @@ export class LoopServiceSettingsComponent implements OnInit, OnDestroy {
this.store.dispatch(setChildNodeSettingsLND({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsCL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
this.store.dispatch(setChildNodeSettingsECL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers
}
}));
}

View File

@ -43,19 +43,19 @@ export class PeerswapServiceSettingsComponent implements OnInit, OnDestroy {
this.store.dispatch(setChildNodeSettingsLND({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
}
}));
this.store.dispatch(setChildNodeSettingsCL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
}
}));
this.store.dispatch(setChildNodeSettingsECL({
payload: {
userPersona: this.selNode.settings.userPersona, channelBackupPath: this.selNode.settings.channelBackupPath, selCurrencyUnit: this.selNode.settings.currencyUnit, currencyUnits: this.selNode.settings.currencyUnits, fiatConversion: this.selNode.settings.fiatConversion,
lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
unannouncedChannels: this.selNode.unannouncedChannels, lnImplementation: this.selNode.lnImplementation, swapServerUrl: this.selNode.settings.swapServerUrl, boltzServerUrl: this.selNode.settings.boltzServerUrl, enableOffers: this.selNode.settings.enableOffers, enablePeerswap: this.selNode.settings.enablePeerswap
}
}));
}

View File

@ -15,8 +15,9 @@ export class Settings {
public userPersona: string,
public themeMode: string,
public themeColor: string,
public currencyUnits: Array<string>,
public unannouncedChannels: boolean,
public fiatConversion: boolean,
public currencyUnits: Array<string>,
public bitcoindConfigPath?: string,
public logLevel?: string,
public lnServerUrl?: string,
@ -81,6 +82,7 @@ export interface SelNodeChild {
selCurrencyUnit?: string;
currencyUnits?: string[];
fiatConversion?: boolean;
unannouncedChannels?: boolean;
lnImplementation?: string;
swapServerUrl?: string;
boltzServerUrl?: string;

View File

@ -746,12 +746,13 @@ export const mockActionsData = {
userPersona: 'MERCHANT',
themeMode: 'NIGHT',
themeColor: 'TEAL',
unannouncedChannels: false,
fiatConversion: true,
currencyUnits: [
'BTC',
'SATS',
'USD'
],
fiatConversion: true,
bitcoindConfigPath: '',
enableLogging: true,
lnServerUrl: '',
@ -774,12 +775,13 @@ export const mockActionsData = {
resetChildrenStores: {
userPersona: 'MERCHANT',
channelBackupPath: '',
unannouncedChannels: false,
fiatConversion: true,
selCurrencyUnit: '',
currencyUnits: [
'Sats',
'BTC'
],
fiatConversion: true,
lnImplementation: 'LND',
swapServerUrl: '',
boltzServerUrl: '',
@ -791,12 +793,13 @@ export const mockActionsData = {
userPersona: 'MERCHANT',
themeMode: 'NIGHT',
themeColor: 'TEAL',
unannouncedChannels: false,
fiatConversion: true,
currencyUnits: [
'BTC',
'SATS',
'USD'
],
fiatConversion: true,
bitcoindConfigPath: '',
enableLogging: true,
lnServerUrl: '',
@ -863,6 +866,7 @@ export const mockRTLStoreState = {
userPersona: 'OPERATOR',
themeMode: 'DAY',
themeColor: 'TEAL',
unannouncedChannels: false,
fiatConversion: true,
bitcoindConfigPath: '../bitcoin.conf',
enableLogging: true,
@ -901,6 +905,7 @@ export const mockRTLStoreState = {
themeMode: 'DAY',
themeColor: 'TEAL',
fiatConversion: true,
unannouncedChannels: false,
bitcoindConfigPath: '../bitcoin.conf',
enableLogging: true,
lnServerUrl: 'https://localhost:8080',
@ -928,6 +933,7 @@ export const mockRTLStoreState = {
userPersona: 'MERCHANT',
themeMode: 'DAY',
themeColor: 'INDIGO',
unannouncedChannels: false,
fiatConversion: true,
bitcoindConfigPath: '',
enableLogging: true,
@ -956,6 +962,7 @@ export const mockRTLStoreState = {
userPersona: 'OPERATOR',
themeMode: 'NIGHT',
themeColor: 'PURPLE',
unannouncedChannels: false,
fiatConversion: true,
bitcoindConfigPath: '',
enableLogging: false,
@ -998,13 +1005,14 @@ export const mockRTLStoreState = {
nodeSettings: {
userPersona: 'OPERATOR',
channelBackupPath: '..\\\\RTL\\\\backup\\\\node-1',
unannouncedChannels: false,
fiatConversion: true,
selCurrencyUnit: 'USD',
currencyUnits: [
'Sats',
'BTC',
'USD'
],
fiatConversion: true,
lnImplementation: 'LND',
swapServerUrl: 'https://localhost:8081',
boltzServerUrl: 'https://localhost:9003'
@ -48635,13 +48643,14 @@ export const mockRTLStoreState = {
nodeSettings: {
userPersona: 'OPERATOR',
channelBackupPath: '..\\\\RTL\\\\backup\\\\node-1',
unannouncedChannels: false,
fiatConversion: true,
selCurrencyUnit: 'USD',
currencyUnits: [
'Sats',
'BTC',
'USD'
],
fiatConversion: true,
lnImplementation: 'LND',
swapServerUrl: 'https://localhost:8081',
boltzServerUrl: 'https://localhost:9003'
@ -48668,13 +48677,14 @@ export const mockRTLStoreState = {
nodeSettings: {
userPersona: 'OPERATOR',
channelBackupPath: '..\\\\RTL\\\\backup\\\\node-1',
unannouncedChannels: false,
fiatConversion: true,
selCurrencyUnit: 'USD',
currencyUnits: [
'Sats',
'BTC',
'USD'
],
fiatConversion: true,
lnImplementation: 'LND',
swapServerUrl: 'https://localhost:8081',
boltzServerUrl: 'https://localhost:9003'

View File

@ -550,8 +550,9 @@ export class RTLEffects implements OnDestroy {
initializeNode(node: ConfigSettingsNode, isInitialSetup: boolean) {
this.logger.info('Initializing node from RTL Effects.');
const landingPage = isInitialSetup ? '' : 'HOME';
const selNode = { userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, selCurrencyUnit: node.settings.currencyUnit,
currencyUnits: CURRENCY_UNITS, fiatConversion: node.settings.fiatConversion, lnImplementation: node.lnImplementation, swapServerUrl: node.settings.swapServerUrl, boltzServerUrl: node.settings.boltzServerUrl, enableOffers: node.settings.enableOffers, enablePeerswap: node.settings.enablePeerswap };
const selNode = { userPersona: node.settings.userPersona, channelBackupPath: node.settings.channelBackupPath, unannouncedChannels: !!node.settings.unannouncedChannels,
selCurrencyUnit: node.settings.currencyUnit, currencyUnits: CURRENCY_UNITS, fiatConversion: node.settings.fiatConversion, lnImplementation: node.lnImplementation,
swapServerUrl: node.settings.swapServerUrl, boltzServerUrl: node.settings.boltzServerUrl, enableOffers: node.settings.enableOffers, enablePeerswap: node.settings.enablePeerswap };
if (node.settings.fiatConversion && node.settings.currencyUnit) {
selNode['currencyUnits'] = [...CURRENCY_UNITS, node.settings.currencyUnit];
}

View File

@ -14,7 +14,7 @@ export interface RootState {
nodeData: GetInfoRoot;
}
const initNodeSettings = { userPersona: 'OPERATOR', themeMode: 'DAY', themeColor: 'PURPLE', channelBackupPath: '', selCurrencyUnit: 'USD', fiatConversion: false, currencyUnits: ['Sats', 'BTC', 'USD'], bitcoindConfigPath: '', enableOffers: false, enablePeerswap: false };
const initNodeSettings = { userPersona: 'OPERATOR', themeMode: 'DAY', themeColor: 'PURPLE', channelBackupPath: '', selCurrencyUnit: 'USD', unannouncedChannels: false, fiatConversion: false, currencyUnits: ['Sats', 'BTC', 'USD'], bitcoindConfigPath: '', enableOffers: false, enablePeerswap: false };
const initNodeAuthentication = { configPath: '', swapMacaroonPath: '', boltzMacaroonPath: '' };
export const initRootState: RootState = {