CLN: Removed child node settings

pull/1382/head
ShahanaFarooqui 3 weeks ago
parent 7cf6ccd06a
commit 80dc699a18

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

@ -0,0 +1 @@
(()=>{"use strict";var e,v={},m={};function r(e){var f=m[e];if(void 0!==f)return f.exports;var t=m[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=(f,t,i,o)=>{if(!t){var a=1/0;for(n=0;n<e.length;n++){for(var[t,i,o]=e[n],s=!0,d=0;d<t.length;d++)(!1&o||a>=o)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(s=!1,o<a&&(a=o));if(s){e.splice(n--,1);var u=i();void 0!==u&&(f=u)}}return f}o=o||0;for(var n=e.length;n>0&&e[n-1][2]>o;n--)e[n]=e[n-1];e[n]=[t,i,o]},r.d=(e,f)=>{for(var t in f)r.o(f,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:f[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((f,t)=>(r.f[t](e,f),f),[])),r.u=e=>e+"."+{125:"3d2fff0dc042e6f8",456:"526382858b470223",570:"12d89c463aa15a79",758:"db0aa17832e6073d"}[e]+".js",r.miniCssF=e=>{},r.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),(()=>{var e={},f="RTLApp:";r.l=(t,i,o,n)=>{if(e[t])e[t].push(i);else{var a,s;if(void 0!==o)for(var d=document.getElementsByTagName("script"),u=0;u<d.length;u++){var l=d[u];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==f+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",f+o),a.src=r.tu(t)),e[t]=[i];var c=(g,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(y=>y(b)),g)return g(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=>{typeof Symbol<"u"&&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:f=>f},typeof trustedTypes<"u"&&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=(i,o)=>{var n=r.o(e,i)?e[i]:void 0;if(0!==n)if(n)o.push(n[2]);else if(666!=i){var a=new Promise((l,c)=>n=e[i]=[l,c]);o.push(n[2]=a);var s=r.p+r.u(i),d=new Error;r.l(s,l=>{if(r.o(e,i)&&(0!==(n=e[i])&&(e[i]=void 0),n)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;d.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,n[1](d)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var f=(i,o)=>{var d,u,[n,a,s]=o,l=0;if(n.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(s)var c=s(r)}for(i&&i(o);l<n.length;l++)r.o(e,u=n[l])&&e[u]&&e[u][0](),e[u]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(f.bind(null,0)),t.push=f.bind(null,t.push.bind(t))})()})();

@ -1 +0,0 @@
(()=>{"use strict";var e,v={},m={};function r(e){var o=m[e];if(void 0!==o)return o.exports;var t=m[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=(o,t,i,f)=>{if(!t){var a=1/0;for(n=0;n<e.length;n++){for(var[t,i,f]=e[n],s=!0,l=0;l<t.length;l++)(!1&f||a>=f)&&Object.keys(r.O).every(b=>r.O[b](t[l]))?t.splice(l--,1):(s=!1,f<a&&(a=f));if(s){e.splice(n--,1);var d=i();void 0!==d&&(o=d)}}return o}f=f||0;for(var n=e.length;n>0&&e[n-1][2]>f;n--)e[n]=e[n-1];e[n]=[t,i,f]},r.d=(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((o,t)=>(r.f[t](e,o),o),[])),r.u=e=>e+"."+{125:"85c919c00d436a59",456:"526382858b470223",570:"12d89c463aa15a79",758:"db0aa17832e6073d"}[e]+".js",r.miniCssF=e=>{},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={},o="RTLApp:";r.l=(t,i,f,n)=>{if(e[t])e[t].push(i);else{var a,s;if(void 0!==f)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==o+f){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",o+f),a.src=r.tu(t)),e[t]=[i];var c=(g,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(y=>y(b)),g)return g(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=>{typeof Symbol<"u"&&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:o=>o},typeof trustedTypes<"u"&&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=(i,f)=>{var n=r.o(e,i)?e[i]:void 0;if(0!==n)if(n)f.push(n[2]);else if(666!=i){var a=new Promise((u,c)=>n=e[i]=[u,c]);f.push(n[2]=a);var s=r.p+r.u(i),l=new Error;r.l(s,u=>{if(r.o(e,i)&&(0!==(n=e[i])&&(e[i]=void 0),n)){var c=u&&("load"===u.type?"missing":u.type),p=u&&u.target&&u.target.src;l.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",l.name="ChunkLoadError",l.type=c,l.request=p,n[1](l)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var o=(i,f)=>{var l,d,[n,a,s]=f,u=0;if(n.some(p=>0!==e[p])){for(l in a)r.o(a,l)&&(r.m[l]=a[l]);if(s)var c=s(r)}for(i&&i(f);u<n.length;u++)r.o(e,d=n[u])&&e[d]&&e[d][0](),e[d]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})()})();

@ -14,7 +14,7 @@ import { LoggerService } from '../../shared/services/logger.service';
import { CommonService } from '../../shared/services/common.service';
import { RTLState } from '../../store/rtl.state';
import { channels, utxoBalances, nodeInfoAndNodeSettingsAndAPIsStatus } from '../store/cln.selector';
import { channels, utxoBalances, nodeInfoAndAPIsStatus } from '../store/cln.selector';
export interface Tile {
id: string;
@ -117,7 +117,7 @@ export class CLNHomeComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.store.select(nodeInfoAndNodeSettingsAndAPIsStatus).pipe(takeUntil(this.unSubs[0])).
this.store.select(nodeInfoAndAPIsStatus).pipe(takeUntil(this.unSubs[0])).
subscribe((infoSettingsStatusSelector: { information: GetInfo, nodeSettings: Node | null, fees: Fees, apisCallStatus: ApiCallStatusPayload[] }) => {
this.errorMessages[0] = '';
this.errorMessages[3] = '';

@ -18,7 +18,7 @@ import { openAlert, openConfirmation } from '../../../store/rtl.actions';
import { RTLState } from '../../../store/rtl.state';
import { RTLEffects } from '../../../store/rtl.effects';
import { CLNOpenLiquidityChannelComponent } from '../open-liquidity-channel-modal/open-liquidity-channel-modal.component';
import { clnPageSettings, nodeInfoAndNodeSettingsAndBalance } from '../../store/cln.selector';
import { clnPageSettings, nodeInfoAndBalance } from '../../store/cln.selector';
import { DatePipe } from '@angular/common';
import { ColumnDefinition, PageSettings, TableSetting } from '../../../shared/models/pageSettings';
import { CamelCaseWithReplacePipe } from '../../../shared/pipes/app.pipe';
@ -93,12 +93,12 @@ export class CLNLiquidityAdsListComponent implements OnInit, OnDestroy {
this.colWidth = this.displayedColumns.length ? ((this.commonService.getContainerSize().width / this.displayedColumns.length) / 14) + 'rem' : '20rem';
this.logger.info(this.displayedColumns);
});
combineLatest([this.store.select(nodeInfoAndNodeSettingsAndBalance), this.dataService.listNetworkNodes({ liquidity_ads: true })]).pipe(takeUntil(this.unSubs[1])).
combineLatest([this.store.select(nodeInfoAndBalance), this.dataService.listNetworkNodes({ liquidity_ads: true })]).pipe(takeUntil(this.unSubs[1])).
subscribe({
next: ([infoSettingsBalSelector, nodeListRes]) => {
this.information = infoSettingsBalSelector.information;
this.totalBalance = infoSettingsBalSelector.balance.totalBalance || 0;
this.logger.info(infoSettingsBalSelector);
next: ([infoBalSelector, nodeListRes]) => {
this.information = infoBalSelector.information;
this.totalBalance = infoBalSelector.balance.totalBalance || 0;
this.logger.info(infoBalSelector);
if (nodeListRes && !(<any[]>nodeListRes).length) { nodeListRes = []; }
this.logger.info('Received Liquidity Ads Enabled Nodes: ' + JSON.stringify(nodeListRes));
this.listNodesCallStatus = APICallStatusEnum.COMPLETED;

@ -12,7 +12,8 @@ import { LoggerService } from '../../shared/services/logger.service';
import { CommonService } from '../../shared/services/common.service';
import { RTLState } from '../../store/rtl.state';
import { channels, feeRatesPerKB, feeRatesPerKW, forwardingHistory, utxoBalances, nodeInfoAndNodeSettingsAndAPIsStatus } from '../store/cln.selector';
import { rootSelectedNode } from '../../store/rtl.selector';
import { channels, feeRatesPerKB, feeRatesPerKW, forwardingHistory, utxoBalances, nodeInfoAndAPIsStatus } from '../store/cln.selector';
@Component({
selector: 'rtl-cln-network-info',
@ -80,14 +81,15 @@ export class CLNNetworkInfoComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.store.select(nodeInfoAndNodeSettingsAndAPIsStatus).pipe(takeUntil(this.unSubs[0])).
subscribe((infoSettingsStatusSelector: { information: GetInfo, nodeSettings: Node | null, fees: Fees, apisCallStatus: ApiCallStatusPayload[] }) => {
this.store.select(nodeInfoAndAPIsStatus).pipe(takeUntil(this.unSubs[0]),
withLatestFrom(this.store.select(rootSelectedNode))).
subscribe(([infoSettingsStatusSelector, nodeSettings]: [{ information: GetInfo, fees: Fees, apisCallStatus: ApiCallStatusPayload[] }, (Node | null)]) => {
this.errorMessages[0] = '';
this.apiCallStatusNodeInfo = infoSettingsStatusSelector.apisCallStatus[0];
if (this.apiCallStatusNodeInfo.status === APICallStatusEnum.ERROR) {
this.errorMessages[0] = (typeof (this.apiCallStatusNodeInfo.message) === 'object') ? JSON.stringify(this.apiCallStatusNodeInfo.message) : this.apiCallStatusNodeInfo.message ? this.apiCallStatusNodeInfo.message : '';
}
this.selNode = infoSettingsStatusSelector.nodeSettings;
this.selNode = nodeSettings;
this.information = infoSettingsStatusSelector.information;
this.fees = infoSettingsStatusSelector.fees;
this.logger.info(infoSettingsStatusSelector);

@ -8,8 +8,9 @@ import { faExchangeAlt, faChartPie } from '@fortawesome/free-solid-svg-icons';
import { CLNOnChainSendModalComponent } from './on-chain-send-modal/on-chain-send-modal.component';
import { Node } from '../../shared/models/RTLconfig';
import { RTLState } from '../../store/rtl.state';
import { rootSelectedNode } from '../../store/rtl.selector';
import { openAlert } from '../../store/rtl.actions';
import { utxoBalances, clnNodeSettings } from '../store/cln.selector';
import { utxoBalances } from '../store/cln.selector';
import { Balance, LocalRemoteBalance, UTXO } from '../../shared/models/clnModels';
import { ApiCallStatusPayload } from '../../shared/models/apiCallsPayload';
@ -44,7 +45,7 @@ export class CLNOnChainComponent implements OnInit, OnDestroy {
this.selectedTable = this.tables.find((table) => table.name === (<ResolveEnd>value).urlAfterRedirects.substring((<ResolveEnd>value).urlAfterRedirects.lastIndexOf('/') + 1)) || this.tables[0];
}
});
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[1])).
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[1])).
subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});

@ -1,7 +1,7 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router, ResolveEnd, Event } from '@angular/router';
import { Subject } from 'rxjs';
import { takeUntil, filter } from 'rxjs/operators';
import { takeUntil, filter, withLatestFrom } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { CLNOpenChannelComponent } from '../open-channel-modal/open-channel.component';
@ -12,7 +12,8 @@ import { Node } from '../../../../shared/models/RTLconfig';
import { RTLState } from '../../../../store/rtl.state';
import { openAlert } from '../../../../store/rtl.actions';
import { channels, nodeInfoAndNodeSettingsAndBalance, peers, utxoBalances } from '../../../store/cln.selector';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { channels, nodeInfoAndBalance, peers, utxoBalances } from '../../../store/cln.selector';
import { ApiCallStatusPayload } from '../../../../shared/models/apiCallsPayload';
@Component({
@ -44,12 +45,13 @@ export class CLNChannelsTablesComponent implements OnInit, OnDestroy {
this.activeLink = this.links.findIndex((link) => link.link === (<ResolveEnd>value).urlAfterRedirects.substring((<ResolveEnd>value).urlAfterRedirects.lastIndexOf('/') + 1));
}
});
this.store.select(nodeInfoAndNodeSettingsAndBalance).pipe(takeUntil(this.unSubs[1])).
subscribe((infoSettingsBalSelector: { information: GetInfo, nodeSettings: Node | null, balance: Balance }) => {
this.selNode = infoSettingsBalSelector.nodeSettings;
this.information = infoSettingsBalSelector.information;
this.totalBalance = infoSettingsBalSelector.balance.totalBalance || 0;
this.logger.info(infoSettingsBalSelector);
this.store.select(nodeInfoAndBalance).pipe(takeUntil(this.unSubs[1]),
withLatestFrom(this.store.select(rootSelectedNode))).
subscribe(([infoBalSelector, nodeSettings]: [{ information: GetInfo, balance: Balance }, (Node | null)]) => {
this.selNode = nodeSettings;
this.information = infoBalSelector.information;
this.totalBalance = infoBalSelector.balance.totalBalance || 0;
this.logger.info(infoBalSelector);
});
this.store.select(peers).pipe(takeUntil(this.unSubs[2])).
subscribe((peersSelector: { peers: Peer[], apiCallStatus: ApiCallStatusPayload }) => {

@ -15,7 +15,7 @@ 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 { rootSelectedNode } from '../../../../store/rtl.selector';
import { Node } from '../../../../shared/models/RTLconfig';
@Component({
@ -73,7 +73,7 @@ export class CLNOpenChannelComponent implements OnInit, OnDestroy {
this.peers = [];
}
this.alertTitle = this.data.alertTitle || 'Alert';
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
this.isPrivate = !!nodeSettings?.settings.unannouncedChannels;

@ -16,7 +16,7 @@ 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 { rootSelectedNode } from '../../../store/rtl.selector';
import { Node } from '../../../shared/models/RTLconfig';
@Component({
@ -75,7 +75,7 @@ export class CLNConnectPeerComponent implements OnInit, OnDestroy {
hiddenAmount: ['', [Validators.required]]
});
this.statusFormGroup = this.formBuilder.group({});
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).
subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
this.channelFormGroup.controls.isPrivate.setValue(!!nodeSettings?.settings.unannouncedChannels);

@ -3,7 +3,6 @@ import { Offer } from '../../shared/models/clnModels';
import { CLNState } from './cln.state';
export const clnState = createFeatureSelector<CLNState>('cln');
export const clnNodeSettings = createSelector(clnState, (state: CLNState) => state.nodeSettings);
export const clnPageSettings = createSelector(clnState, (state: CLNState) => ({ pageSettings: state.pageSettings, apiCallStatus: state.apisCallStatus.FetchPageSettings }));
export const clnNodeInformation = createSelector(clnState, (state: CLNState) => state.information);
export const apiCallStatusNodeInfo = createSelector(clnState, (state: CLNState) => state.apisCallStatus.FetchInfo);
@ -15,15 +14,12 @@ export const feeRatesPerKW = createSelector(clnState, (state: CLNState) => ({ fe
export const listInvoices = createSelector(clnState, (state: CLNState) => ({ listInvoices: state.invoices, apiCallStatus: state.apisCallStatus.FetchInvoices }));
export const utxoBalances = createSelector(clnState, (state: CLNState) => ({ utxos: state.utxos, balance: state.balance, localRemoteBalance: state.localRemoteBalance, apiCallStatus: state.apisCallStatus.FetchUTXOBalances }));
export const channels = createSelector(clnState, (state: CLNState) => ({ activeChannels: state.activeChannels, pendingChannels: state.pendingChannels, inactiveChannels: state.inactiveChannels, apiCallStatus: state.apisCallStatus.FetchChannels }));
// export const balance = createSelector(clnState, (state: CLNState) => ({ balance: state.balance, apiCallStatus: state.apisCallStatus.FetchBalance }));
// export const localRemoteBalance = createSelector(clnState, (state: CLNState) => ({ localRemoteBalance: state.localRemoteBalance, apiCallStatus: state.apisCallStatus.FetchLocalRemoteBalance }));
export const forwardingHistory = createSelector(clnState, (state: CLNState) => ({ forwardingHistory: state.forwardingHistory, apiCallStatus: state.apisCallStatus.FetchForwardingHistoryS }));
export const failedForwardingHistory = createSelector(clnState, (state: CLNState) => ({ failedForwardingHistory: state.failedForwardingHistory, apiCallStatus: state.apisCallStatus.FetchForwardingHistoryF }));
export const localFailedForwardingHistory = createSelector(clnState, (state: CLNState) => ({ localFailedForwardingHistory: state.localFailedForwardingHistory, apiCallStatus: state.apisCallStatus.FetchForwardingHistoryL }));
export const nodeInfoAndNodeSettingsAndBalance = createSelector(clnState, (state: CLNState) => ({ information: state.information, nodeSettings: state.nodeSettings, balance: state.balance }));
export const nodeInfoAndBalanceAndNumPeers = createSelector(clnState, (state: CLNState) => ({ information: state.information, balance: state.balance, numPeers: state.peers.length }));
export const nodeInfoAndBalance = createSelector(clnState, (state: CLNState) => ({ information: state.information, balance: state.balance }));
export const nodeInfoAndNodeSettingsAndAPIsStatus = createSelector(clnState, (state: CLNState) => ({ information: state.information, nodeSettings: state.nodeSettings, fees: state.fees, apisCallStatus: [state.apisCallStatus.FetchInfo, state.apisCallStatus.FetchForwardingHistoryS] }));
export const nodeInfoAndAPIsStatus = createSelector(clnState, (state: CLNState) => ({ information: state.information, fees: state.fees, apisCallStatus: [state.apisCallStatus.FetchInfo, state.apisCallStatus.FetchForwardingHistoryS] }));
export const offers = createSelector(clnState, (state: CLNState) => ({ offers: state.offers, apiCallStatus: state.apisCallStatus.FetchOffers }));
export const offerBookmarks = createSelector(clnState, (state: CLNState) => ({ offersBookmarks: state.offersBookmarks, apiCallStatus: state.apisCallStatus.FetchOfferBookmarks }));
export const getoffer = (bolt12Str) => createSelector(clnState, (state: CLNState) => (state.offers.find((offer: Offer) => offer.bolt12 === bolt12Str)));

@ -12,7 +12,6 @@ const initNodeAuthentication: Authentication = { configPath: '', swapMacaroonPat
export interface CLNState {
apisCallStatus: ApiCallsListCL;
nodeSettings: Node | null;
pageSettings: PageSettings[];
information: GetInfo;
fees: Fees;
@ -51,7 +50,6 @@ export const initCLNState: CLNState = {
FetchOffers: { status: APICallStatusEnum.UN_INITIATED },
FetchOfferBookmarks: { status: APICallStatusEnum.UN_INITIATED }
},
nodeSettings: { index: 1, lnNode: 'Node 1', settings: initNodeSettings, authentication: initNodeAuthentication, lnImplementation: 'CLN' },
pageSettings: CLN_DEFAULT_PAGE_SETTINGS,
information: {},
fees: {},

@ -15,8 +15,9 @@ import { GetInfo } from '../../../../shared/models/clnModels';
import { CommonService } from '../../../../shared/services/common.service';
import { RTLState } from '../../../../store/rtl.state';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { saveNewInvoice } from '../../../store/cln.actions';
import { clnNodeInformation, clnNodeSettings } from '../../../store/cln.selector';
import { clnNodeInformation } from '../../../store/cln.selector';
@Component({
selector: 'rtl-cln-create-invoices',
@ -47,7 +48,7 @@ export class CLNCreateInvoiceComponent implements OnInit, OnDestroy {
ngOnInit() {
this.pageSize = this.data.pageSize;
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {

@ -23,8 +23,9 @@ import { CLNInvoiceInformationComponent } from '../invoice-information-modal/inv
import { RTLEffects } from '../../../../store/rtl.effects';
import { RTLState } from '../../../../store/rtl.state';
import { openAlert, openConfirmation } from '../../../../store/rtl.actions';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { deleteExpiredInvoice, invoiceLookup, saveNewInvoice } from '../../../store/cln.actions';
import { clnNodeInformation, clnNodeSettings, clnPageSettings, listInvoices } from '../../../store/cln.selector';
import { clnNodeInformation, clnPageSettings, listInvoices } from '../../../store/cln.selector';
import { ColumnDefinition, PageSettings, TableSetting } from '../../../../shared/models/pageSettings';
import { CamelCaseWithReplacePipe } from '../../../../shared/pipes/app.pipe';
import { ConvertedCurrency } from '../../../../shared/models/rtlModels';
@ -79,7 +80,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
}
ngOnInit() {
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = <Node>nodeSettings;
});
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {

@ -14,8 +14,9 @@ import { GetInfo } from '../../../../shared/models/clnModels';
import { CommonService } from '../../../../shared/services/common.service';
import { RTLState } from '../../../../store/rtl.state';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { saveNewOffer } from '../../../store/cln.actions';
import { clnNodeInformation, clnNodeSettings } from '../../../store/cln.selector';
import { clnNodeInformation } from '../../../store/cln.selector';
@Component({
selector: 'rtl-cln-create-offer',
@ -39,7 +40,7 @@ export class CLNCreateOfferComponent implements OnInit, OnDestroy {
ngOnInit() {
this.pageSize = this.data.pageSize;
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {

@ -25,8 +25,9 @@ import { CLNOfferInformationComponent } from '../offer-information-modal/offer-i
import { RTLEffects } from '../../../../store/rtl.effects';
import { RTLState } from '../../../../store/rtl.state';
import { openAlert, openConfirmation } from '../../../../store/rtl.actions';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { disableOffer } from '../../../store/cln.actions';
import { clnNodeInformation, clnNodeSettings, clnPageSettings, offers } from '../../../store/cln.selector';
import { clnNodeInformation, clnPageSettings, offers } from '../../../store/cln.selector';
import { ColumnDefinition, PageSettings, TableSetting } from '../../../../shared/models/pageSettings';
import { CamelCaseWithReplacePipe } from '../../../../shared/pipes/app.pipe';
import { MAT_SELECT_CONFIG } from '@angular/material/select';
@ -79,7 +80,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy
}
ngOnInit() {
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {

@ -22,8 +22,9 @@ import { Node } from '../../../shared/models/RTLconfig';
import { RTLEffects } from '../../../store/rtl.effects';
import { RTLState } from '../../../store/rtl.state';
import { openAlert, openConfirmation } from '../../../store/rtl.actions';
import { rootSelectedNode } from '../../../store/rtl.selector';
import { sendPayment } from '../../store/cln.actions';
import { clnNodeInformation, clnNodeSettings, clnPageSettings, payments } from '../../store/cln.selector';
import { clnNodeInformation, clnPageSettings, payments } from '../../store/cln.selector';
import { ColumnDefinition, PageSettings, TableSetting } from '../../../shared/models/pageSettings';
import { CamelCaseWithReplacePipe } from '../../../shared/pipes/app.pipe';
import { ConvertedCurrency } from '../../../shared/models/rtlModels';
@ -85,7 +86,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
}
ngOnInit() {
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {

@ -16,8 +16,9 @@ import { CommonService } from '../../../shared/services/common.service';
import { LoggerService } from '../../../shared/services/logger.service';
import { RTLState } from '../../../store/rtl.state';
import { rootSelectedNode } from '../../../store/rtl.selector';
import { fetchOfferInvoice, sendPayment } from '../../store/cln.actions';
import { channels, clnNodeSettings } from '../../store/cln.selector';
import { channels } from '../../store/cln.selector';
import { ApiCallStatusPayload } from '../../../shared/models/apiCallsPayload';
import { CLNPaymentInformation } from '../../../shared/models/alertData';
import { ConvertedCurrency } from '../../../shared/models/rtlModels';
@ -109,7 +110,7 @@ export class CLNLightningSendPaymentsComponent implements OnInit, OnDestroy {
break;
}
}
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
});
this.store.select(channels).pipe(takeUntil(this.unSubs[2])).

@ -9,7 +9,8 @@ import { UserPersonaEnum } from '../../shared/services/consts-enums-functions';
import { LoggerService } from '../../shared/services/logger.service';
import { RTLState } from '../../store/rtl.state';
import { clnNodeSettings, utxoBalances } from '../store/cln.selector';
import { rootSelectedNode } from '../../store/rtl.selector';
import { utxoBalances } from '../store/cln.selector';
import { Balance, LocalRemoteBalance, UTXO } from '../../shared/models/clnModels';
import { ApiCallStatusPayload } from '../../shared/models/apiCallsPayload';
import { Node } from '../../shared/models/RTLconfig';
@ -45,7 +46,7 @@ export class CLNTransactionsComponent implements OnInit, OnDestroy {
this.routerUrl = (<ResolveEnd>value).urlAfterRedirects;
}
});
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[1])).subscribe((nodeSettings: Node | null) => {
this.store.select(rootSelectedNode).pipe(takeUntil(this.unSubs[1])).subscribe((nodeSettings: Node | null) => {
this.selNode = nodeSettings;
if (this.selNode && this.selNode.settings.enableOffers) {
this.store.dispatch(fetchOffers());
@ -57,7 +58,7 @@ export class CLNTransactionsComponent implements OnInit, OnDestroy {
}
});
this.store.select(utxoBalances).pipe(takeUntil(this.unSubs[2]),
withLatestFrom(this.store.select(clnNodeSettings))).
withLatestFrom(this.store.select(rootSelectedNode))).
subscribe(([utxoBalancesSeletor, nodeSettings]: [{ utxos: UTXO[], balance: Balance, localRemoteBalance: LocalRemoteBalance, apiCallStatus: ApiCallStatusPayload }, (Node | null)]) => {
this.currencyUnits = nodeSettings?.settings.currencyUnits || [];
if (nodeSettings && nodeSettings.settings.userPersona === UserPersonaEnum.OPERATOR) {

@ -13,7 +13,7 @@ import { ApiCallStatusPayload } from '../../../models/apiCallsPayload';
import { rootSelectedNode } from '../../../../store/rtl.selector';
import { Node } from '../../../models/RTLconfig';
import { TableSetting, PageSettings } from '../../../models/pageSettings';
import { clnNodeSettings, clnPageSettings } from '../../../../cln/store/cln.selector';
import { clnPageSettings } from '../../../../cln/store/cln.selector';
import { lndNodeSettings, lndPageSettings } from '../../../../lnd/store/lnd.selector';
import { savePageSettings as savePageSettingsCLN } from '../../../../cln/store/cln.actions';
import { savePageSettings as savePageSettingsLND } from '../../../../lnd/store/lnd.actions';
@ -57,7 +57,7 @@ export class PageSettingsComponent implements OnInit, OnDestroy {
this.defaultSettings = Object.assign([], CLN_DEFAULT_PAGE_SETTINGS);
this.nodePageDefs = CLN_PAGE_DEFS;
this.store.select(clnPageSettings).pipe(takeUntil(this.unSubs[1]),
withLatestFrom(this.store.select(clnNodeSettings))).
withLatestFrom(this.store.select(rootSelectedNode))).
subscribe(([settings, nodeSettings]: [{ pageSettings: PageSettings[], apiCallStatus: ApiCallStatusPayload }, (Node | null)]) => {
const updatedPageSettings = JSON.parse(JSON.stringify(settings.pageSettings));
this.errorMessage = null;

Loading…
Cancel
Save