Release 0.8.0 (#375)

Support for Eclair #224 
set Hourglass animation when logging to RTL enhancement #277 
C-Lightning: Remove 'Local Features' and 'Global Features' fields from Peers grid #350 
Export channel backup files #362 
LND Sweep all: Unable to decode address error #352 
Merchant dashboard alignment issue for Safari #348 
Update Angular and Material to version 9 #295
pull/377/head
ShahanaFarooqui 4 years ago committed by GitHub
parent 1b86a8bc84
commit 848d450732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -15,5 +15,5 @@
<link rel="stylesheet" href="styles.6830931f3c22f4338345.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.d3d799d41e64323a3724.js" defer></script><script src="polyfills-es5.c5e45b6cc146403bcd74.js" nomodule defer></script><script src="polyfills.afc43f94c88c0955cb04.js" defer></script><script src="main.fb298156caeda6c0e64a.js" defer></script></body>
<script src="runtime.9e1ee505456a2d8820a9.js" defer></script><script src="polyfills-es5.c5e45b6cc146403bcd74.js" nomodule defer></script><script src="polyfills.afc43f94c88c0955cb04.js" defer></script><script src="main.6456658e1f20df57ead1.js" defer></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

@ -1 +1 @@
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,d=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&d.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);d.length;)d.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"bd61e6826dbafb306978",6:"04daddbdac8cd62e9aea",7:"4a4cbdfbbc02f4356464",8:"65561c0d66d24e36d541"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"bd61e6826dbafb306978",6:"e2541318e9b128d4649b",7:"4a4cbdfbbc02f4356464",8:"1b551056b55d7fc58bda"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);

@ -6,21 +6,16 @@
<mat-divider class="my-1"></mat-divider>
</div>
<div fxLayout="row">
<div fxLayout="column" fxFlex="50" fxLayoutAlign="end start" class="my-1">
<div fxLayout="column" fxFlex="100" fxLayoutAlign="end start" class="my-1">
<h4 fxLayoutAlign="start" class="font-bold-500">Alias</h4>
<span class="foreground-secondary-text">{{lookupResult.alias}}<span class="ml-2" [ngStyle]="{'background-color': '#' + lookupResult.color}">{{lookupResult.color ? '#' + lookupResult.color : ''}}</span></span>
<mat-divider class="my-1"></mat-divider>
</div>
<div fxLayout="column" fxFlex="50" fxLayoutAlign="end start" class="my-1">
<h4 fxLayoutAlign="start" class="font-bold-500">Last Update</h4>
<span class="foreground-secondary-text">{{lookupResult.last_timestamp_str}}</span>
<mat-divider class="my-1"></mat-divider>
</div>
</div>
<div fxLayout="row">
<div fxLayout="column" fxFlex="50" fxLayoutAlign="end start" class="my-1">
<h4 fxLayoutAlign="start" class="font-bold-500">Global Features</h4>
<span class="foreground-secondary-text">{{lookupResult.globalfeatures}}</span>
<h4 fxLayoutAlign="start" class="font-bold-500">Last Update</h4>
<span class="foreground-secondary-text">{{lookupResult.last_timestamp_str}}</span>
<mat-divider class="my-1"></mat-divider>
</div>
<div fxLayout="column" fxFlex="50" fxLayoutAlign="end start" class="my-1">

@ -47,9 +47,11 @@ export class CLConnectPeerComponent implements OnInit, OnDestroy {
ngOnInit() {
this.totalBalance = this.data.message.balance;
this.peerAddress = (this.data.message.peer && this.data.message.peer.id && this.data.message.peer.netaddr) ? (this.data.message.peer.id + '@' + this.data.message.peer.netaddr) :
(this.data.message.peer && this.data.message.peer.id && !this.data.message.peer.netaddr) ? this.data.message.peer.id : '';
this.peerFormGroup = this.formBuilder.group({
hiddenAddress: ['', [Validators.required]],
peerAddress: ['', [Validators.required]]
peerAddress: [this.peerAddress, [Validators.required]]
});
this.channelFormGroup = this.formBuilder.group({
fundingAmount: ['', [Validators.required, Validators.min(1), Validators.max(this.totalBalance)]],

@ -1,6 +1,6 @@
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="padding-gap">
<form fxLayout="column" fxLayoutAlign="space-between stretch" fxLayout.gt-sm="row wrap" #peersForm="ngForm">
<button mat-flat-button color="primary" type="submit" tabindex="1" (click)="onConnectPeer()">Add Peer</button>
<button mat-flat-button color="primary" type="submit" tabindex="1" (click)="onConnectPeer({})">Add Peer</button>
</form>
<div fxLayout="column">
<div fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="start center" fxLayoutAlign="start stretch" class="padding-gap-x page-sub-title-container mt-2">
@ -17,34 +17,26 @@
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="peers" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="alias">
<th mat-header-cell *matHeaderCellDef mat-sort-header class="pr-3"> Alias </th>
<td mat-cell *matCellDef="let peer" class="pr-3" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}">
<span *ngIf="peer?.connected" class="dot green" matTooltip="Connected" matTooltipPosition="right" [ngClass]="{'mr-0': screenSize === screenSizeEnum.XS}"></span>
<span *ngIf="!peer?.connected" class="dot red" matTooltip="Disconnected" matTooltipPosition="right" [ngClass]="{'mr-0': screenSize === screenSizeEnum.XS}"></span>
{{peer?.alias}}
</td>
</ng-container>
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef mat-sort-header> ID </th>
<td mat-cell *matCellDef="let peer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '30rem'}">
{{peer?.id}}
</td>
</ng-container>
<ng-container matColumnDef="alias">
<th mat-header-cell *matHeaderCellDef mat-sort-header class="px-3"> Alias </th>
<td mat-cell *matCellDef="let peer" class="px-3" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '25rem'}"> {{peer?.alias}} </td>
</ng-container>
<ng-container matColumnDef="connected">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Connected </th>
<td mat-cell *matCellDef="let peer"> {{peer?.connected}} </td>
</ng-container>
<ng-container matColumnDef="netaddr">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Network Address </th>
<td mat-cell *matCellDef="let peer" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '20rem'}">
<span *ngFor="let addr of peer?.netaddr; last as isLast">{{ addr}}<span *ngIf="!isLast">,<br></span></span>
</td>
</ng-container>
<ng-container matColumnDef="globalfeatures">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Global Features </th>
<td mat-cell *matCellDef="let peer"> {{peer?.globalfeatures}} </td>
</ng-container>
<ng-container matColumnDef="localfeatures">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Local Features </th>
<td mat-cell *matCellDef="let peer"> {{peer?.localfeatures}} </td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef class="px-3">
<div class="bordered-box table-actions-select">
@ -60,7 +52,8 @@
<mat-select-trigger></mat-select-trigger>
<mat-option (click)="onPeerClick(peer, $event)">View Info</mat-option>
<mat-option (click)="onOpenChannel(peer)">Open Channel</mat-option>
<mat-option (click)="onPeerDetach(peer)">Disconnect</mat-option>
<mat-option *ngIf="peer.connected" (click)="onPeerDetach(peer)">Disconnect</mat-option>
<mat-option *ngIf="!peer.connected" (click)="onConnectPeer(peer)">Reconnect</mat-option>
</mat-select>
</div>
</td>

@ -58,13 +58,13 @@ export class CLPeersComponent implements OnInit, OnDestroy {
this.displayedColumns = ['alias', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM) {
this.flgSticky = false;
this.displayedColumns = ['id', 'alias', 'netaddr', 'actions'];
this.displayedColumns = ['alias', 'id', 'netaddr', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['id', 'alias', 'netaddr', 'globalfeatures', 'localfeatures', 'actions'];
this.displayedColumns = ['alias', 'id', 'netaddr', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['id', 'alias', 'netaddr', 'globalfeatures', 'localfeatures', 'actions'];
this.displayedColumns = ['alias', 'id', 'netaddr', 'actions'];
}
}
@ -108,9 +108,7 @@ export class CLPeersComponent implements OnInit, OnDestroy {
[{key: 'id', value: selPeer.id, title: 'Public Key', width: 100}],
[{key: 'netaddr', value: selPeer.netaddr, title: 'Address', width: 100}],
[{key: 'alias', value: selPeer.alias, title: 'Alias', width: 50},
{key: 'connected', value: selPeer.connected ? 'True' : 'False', title: 'Connected', width: 50}],
[{key: 'globalfeatures', value: selPeer.globalfeatures, title: 'Global Features', width: 50},
{key: 'localfeatures', value: selPeer.localfeatures, title: 'Local Features', width: 50}]
{key: 'connected', value: selPeer.connected ? 'True' : 'False', title: 'Connected', width: 50}]
];
this.store.dispatch(new RTLActions.OpenAlert({ data: {
type: AlertTypeEnum.INFORMATION,
@ -121,9 +119,9 @@ export class CLPeersComponent implements OnInit, OnDestroy {
}}));
}
onConnectPeer() {
onConnectPeer(selPeer: Peer) {
this.store.dispatch(new RTLActions.OpenAlert({ data: {
message: { peer: null, information: this.information, balance: this.availableBalance },
message: { peer: (selPeer.id ? selPeer : null), information: this.information, balance: this.availableBalance },
component: CLConnectPeerComponent
}}));
}

@ -33,7 +33,15 @@ export class CLEffects implements OnDestroy {
private logger: LoggerService,
private commonService: CommonService,
private router: Router,
private location: Location) { }
private location: Location) {
this.store.select('cl')
.pipe(takeUntil(this.unSubs[0]))
.subscribe((rtlStore) => {
if(rtlStore.initialAPIResponseCounter > 7) {
this.store.dispatch(new RTLActions.CloseSpinner());
}
});
}
@Effect()
infoFetchCL = this.actions$.pipe(
@ -708,6 +716,7 @@ export class CLEffects implements OnDestroy {
smaller_currency_unit: 'Sats',
numberOfPendingChannels: info.num_pending_channels
};
this.store.dispatch(new RTLActions.OpenSpinner('Initializing Node Data...'));
this.store.dispatch(new RTLActions.SetNodeData(node_data));
this.store.dispatch(new CLActions.FetchFees());
this.store.dispatch(new CLActions.FetchChannels());

@ -6,6 +6,7 @@ import * as CLActions from '../store/cl.actions';
import * as RTLActions from '../../store/rtl.actions';
export interface CLState {
initialAPIResponseCounter: number;
effectErrors: ErrorPayload[];
nodeSettings: SelNodeChild;
information: GetInfo;
@ -23,6 +24,7 @@ export interface CLState {
}
export const initCLState: CLState = {
initialAPIResponseCounter: 0,
effectErrors: [],
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [] },
information: {},
@ -76,17 +78,20 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
case CLActions.SET_FEES_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
fees: action.payload
};
case CLActions.SET_FEE_RATES_CL:
if (action.payload.perkb) {
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
feeRatesPerKB: action.payload
};
} else if (action.payload.perkw) {
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
feeRatesPerKW: action.payload
};
} else {
@ -97,16 +102,19 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
case CLActions.SET_BALANCE_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
balance: action.payload
};
case CLActions.SET_LOCAL_REMOTE_BALANCE_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
localRemoteBalance: action.payload
};
case CLActions.SET_PEERS_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
peers: action.payload
};
case CLActions.ADD_PEER_CL:
@ -129,6 +137,7 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
case CLActions.SET_CHANNELS_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
allChannels: action.payload,
};
case CLActions.REMOVE_CHANNEL_CL:
@ -151,6 +160,7 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
case CLActions.SET_FORWARDING_HISTORY_CL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
forwardingHistory: action.payload
};
case CLActions.ADD_INVOICE_CL:

@ -32,7 +32,15 @@ export class ECLEffects implements OnDestroy {
private logger: LoggerService,
private commonService: CommonService,
private router: Router,
private location: Location) { }
private location: Location) {
this.store.select('ecl')
.pipe(takeUntil(this.unSubs[0]))
.subscribe((rtlStore) => {
if(rtlStore.initialAPIResponseCounter > 4) {
this.store.dispatch(new RTLActions.CloseSpinner());
}
});
}
@Effect()
infoFetchECL = this.actions$.pipe(
@ -586,6 +594,7 @@ export class ECLEffects implements OnDestroy {
smaller_currency_unit: 'Sats',
numberOfPendingChannels: 0
};
this.store.dispatch(new RTLActions.OpenSpinner('Initializing Node Data...'));
this.store.dispatch(new RTLActions.SetNodeData(node_data));
this.store.dispatch(new ECLActions.FetchAudit());
this.store.dispatch(new ECLActions.FetchChannels());

@ -5,6 +5,7 @@ import { UserPersonaEnum } from '../../shared/services/consts-enums-functions';
import * as ECLActions from './ecl.actions';
export interface ECLState {
initialAPIResponseCounter: number;
effectErrors: ErrorPayload[];
nodeSettings: SelNodeChild;
information: GetInfo;
@ -23,6 +24,7 @@ export interface ECLState {
}
export const initECLState: ECLState = {
initialAPIResponseCounter: 0,
effectErrors: [],
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, selCurrencyUnit: 'USD', fiatConversion: false, channelBackupPath: '', currencyUnits: [] },
information: {},
@ -77,6 +79,7 @@ export function ECLReducer(state = initECLState, action: ECLActions.ECLActions)
case ECLActions.SET_FEES_ECL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
fees: action.payload
};
case ECLActions.SET_ACTIVE_CHANNELS_ECL:
@ -97,6 +100,7 @@ export function ECLReducer(state = initECLState, action: ECLActions.ECLActions)
case ECLActions.SET_CHANNELS_STATUS_ECL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
channelsStatus: action.payload,
};
case ECLActions.SET_CHANNEL_STATS_ECL:
@ -107,6 +111,7 @@ export function ECLReducer(state = initECLState, action: ECLActions.ECLActions)
case ECLActions.SET_ONCHAIN_BALANCE_ECL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
onchainBalance: action.payload
};
case ECLActions.SET_LIGHTNING_BALANCE_ECL:
@ -117,6 +122,7 @@ export function ECLReducer(state = initECLState, action: ECLActions.ECLActions)
case ECLActions.SET_PEERS_ECL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
peers: action.payload
};
case ECLActions.REMOVE_PEER_ECL:
@ -146,6 +152,7 @@ export function ECLReducer(state = initECLState, action: ECLActions.ECLActions)
case ECLActions.SET_PAYMENTS_ECL:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
payments: action.payload
};
case ECLActions.SET_TRANSACTIONS_ECL:

@ -38,7 +38,15 @@ export class LNDEffects implements OnDestroy {
private sessionService: SessionService,
public dialog: MatDialog,
private router: Router,
private location: Location) { }
private location: Location) {
this.store.select('lnd')
.pipe(takeUntil(this.unSubs[0]))
.subscribe((rtlStore) => {
if(rtlStore.initialAPIResponseCounter > 8) {
this.store.dispatch(new RTLActions.CloseSpinner());
}
});
}
@Effect()
infoFetch = this.actions$.pipe(
@ -1141,6 +1149,7 @@ export class LNDEffects implements OnDestroy {
currency_unit: info.currency_unit,
smaller_currency_unit: info.smaller_currency_unit
};
this.store.dispatch(new RTLActions.OpenSpinner('Initializing Node Data...'));
this.store.dispatch(new RTLActions.SetNodeData(node_data));
this.store.dispatch(new LNDActions.FetchPeers());
this.store.dispatch(new LNDActions.FetchBalance('channels'));

@ -8,6 +8,7 @@ import { UserPersonaEnum } from '../../shared/services/consts-enums-functions';
import * as LNDActions from './lnd.actions';
export interface LNDState {
initialAPIResponseCounter: number;
effectErrors: ErrorPayload[];
nodeSettings: SelNodeChild;
information: GetInfo;
@ -35,6 +36,7 @@ export interface LNDState {
}
export const initLNDState: LNDState = {
initialAPIResponseCounter: 0,
effectErrors: [],
nodeSettings: { userPersona: UserPersonaEnum.OPERATOR, fiatConversion: false, channelBackupPath: '', currencyUnits: [], selCurrencyUnit: '', lnImplementation: '', swapServerUrl: '' },
information: {},
@ -98,6 +100,7 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
case LNDActions.SET_PEERS_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
peers: action.payload
};
case LNDActions.REMOVE_PEER_LND:
@ -122,16 +125,19 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
case LNDActions.SET_FEES_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
fees: action.payload
};
case LNDActions.SET_CLOSED_CHANNELS_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
closedChannels: action.payload,
};
case LNDActions.SET_PENDING_CHANNELS_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
pendingChannels: action.payload.channels,
numberOfPendingChannels: action.payload.pendingChannels,
};
@ -161,6 +167,7 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
}
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
allChannels: action.payload,
numberOfActiveChannels: activeChannels,
numberOfInactiveChannels: inactiveChannels,
@ -185,6 +192,7 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
if (action.payload.target === 'channels') {
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
channelBalance: action.payload.balance
};
} else {
@ -196,11 +204,13 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
case LNDActions.SET_NETWORK_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
networkInfo: action.payload
};
case LNDActions.SET_INVOICES_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
invoices: action.payload
};
case LNDActions.SET_TOTAL_INVOICES_LND:
@ -216,6 +226,7 @@ export function LNDReducer(state = initLNDState, action: LNDActions.LNDActions)
case LNDActions.SET_PAYMENTS_LND:
return {
...state,
initialAPIResponseCounter: state.initialAPIResponseCounter + 1,
payments: action.payload
};
case LNDActions.SET_FORWARDING_HISTORY_LND:

@ -44,7 +44,7 @@ export interface OpenChannelAlert {
export interface CLOpenChannelAlert {
alertTitle?: string;
titleMessage?: string;
message?: { information: GetInfoCL, balance: number, peer?: any, peers?: PeerCL[] };
message?: { information: GetInfoCL, balance: number, peer?: PeerCL, peers?: PeerCL[] };
newlyAdded?: boolean;
component?: any;
}

@ -77,8 +77,6 @@ export interface Peer {
id?: string;
connected?: boolean;
netaddr?: string[];
globalfeatures?: string;
localfeatures?: string;
alias?: string;
}
@ -234,7 +232,6 @@ export interface LookupNode {
color?: string;
last_timestamp?: number;
last_timestamp_str?: string;
globalfeatures?: string;
features?: string;
addresses?: Address[];
}

Loading…
Cancel
Save