Release 0.8.3 (#397)

Table sort and Loop #388 fix
Material table sort case insensitive
pull/401/head
ShahanaFarooqui 4 years ago committed by GitHub
parent be627fa38d
commit ed9ce410a7
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

File diff suppressed because one or more lines are too long

@ -15,5 +15,5 @@
<link rel="stylesheet" href="styles.7f0a84d9b012559f3600.css"></head>
<body>
<rtl-app></rtl-app>
<script src="runtime.1f2c455b4c4cb8842ded.js" defer></script><script src="polyfills-es5.2ac0d98b22574ae745b1.js" nomodule defer></script><script src="polyfills.5ae721a6ae5ab597a53d.js" defer></script><script src="main.2b25f38109293f7481e1.js" defer></script></body>
<script src="runtime.9e29d6d16121e6e3a653.js" defer></script><script src="polyfills-es5.2ac0d98b22574ae745b1.js" nomodule defer></script><script src="polyfills.5ae721a6ae5ab597a53d.js" defer></script><script src="main.25a1dd16e27f2b400091.js" defer></script></body>
</html>

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
!function(e){function r(r){for(var n,a,i=r[0],f=r[1],c=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 f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),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:"4dffe5e9375cf37e1778",6:"424729942fa4b1e02f1e",7:"8d87e895b92909fe8679",8:"80af93bb0e918cf650e9"}[e]+".js"}(e);var f=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(c);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;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=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||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var l=f;t()}([]);

@ -137,10 +137,6 @@ export class CLHomeComponent implements OnInit, OnDestroy {
}
this.fees = rtlStore.fees;
this.fees.totalTxCount = 0;
if (rtlStore.forwardingHistory && rtlStore.forwardingHistory.forwarding_events && rtlStore.forwardingHistory.forwarding_events.length) {
this.fees.totalTxCount = rtlStore.forwardingHistory.forwarding_events.filter(event => event.status === 'settled').length;
}
if (this.flgLoading[1] !== 'error') {
this.flgLoading[1] = ( this.fees.feeCollected) ? false : true;
}

@ -23,6 +23,7 @@ export class CLNodeLookupComponent implements OnInit {
this.addresses = this.lookupResult.addresses ? new MatTableDataSource<any>([...this.lookupResult.addresses]) : new MatTableDataSource([]);
this.addresses.data = this.lookupResult.addresses ? this.lookupResult.addresses : [];
this.addresses.sort = this.sort;
this.addresses.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
}
onCopyNodeURI(payload: string) {

@ -232,6 +232,7 @@ export class CLChannelOpenTableComponent implements OnInit, OnDestroy {
return newChannel.includes(fltr.toLowerCase());
};
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -112,6 +112,7 @@ export class CLChannelPendingTableComponent implements OnInit, OnDestroy {
return newChannel.includes(fltr.toLowerCase());
};
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -87,6 +87,7 @@ export class CLPeersComponent implements OnInit, OnDestroy {
setTimeout(() => { this.flgAnimate = false; }, 3000);
}
this.peers.sort = this.sort;
this.peers.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.peers.paginator = this.paginator;
if (this.flgLoading[0] !== 'error') {
this.flgLoading[0] = false;

@ -11,11 +11,11 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.status}}</td>
</ng-container>
<ng-container matColumnDef="received_time_str">
<ng-container matColumnDef="received_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Received Time</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.received_time_str}}</td>
</ng-container>
<ng-container matColumnDef="resolved_time_str">
<ng-container matColumnDef="resolved_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Resolved Time</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.resolved_time_str}}</td>
</ng-container>

@ -42,7 +42,7 @@ export class CLFailedTransactionsComponent implements OnInit, OnChanges {
this.displayedColumns = ['status', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['status', 'received_time_str', 'resolved_time_str', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
this.displayedColumns = ['status', 'received_time', 'resolved_time', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
}
}
@ -74,6 +74,7 @@ export class CLFailedTransactionsComponent implements OnInit, OnChanges {
loadForwardingEventsTable(forwardingEvents: ForwardingEvent[]) {
this.forwardingHistoryEvents = new MatTableDataSource<ForwardingEvent>([...forwardingEvents]);
this.forwardingHistoryEvents.sort = this.sort;
this.forwardingHistoryEvents.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.forwardingHistoryEvents.paginator = this.paginator;
this.forwardingHistoryEvents.filterPredicate = (event: ForwardingEvent, fltr: string) => {
const newEvent = event.status + event.received_time_str + event.resolved_time_str + event.in_channel + event.out_channel + (event.in_msatoshi/1000) + (event.out_msatoshi/1000) + event.fee;

@ -11,11 +11,11 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header>Status</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.status}}</td>
</ng-container>
<ng-container matColumnDef="received_time_str">
<ng-container matColumnDef="received_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Received Time</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.received_time_str}}</td>
</ng-container>
<ng-container matColumnDef="resolved_time_str">
<ng-container matColumnDef="resolved_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Resolved Time</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.resolved_time_str}}</td>
</ng-container>

@ -39,10 +39,10 @@ export class CLForwardingHistoryComponent implements OnInit, OnChanges {
this.displayedColumns = ['in_msatoshi', 'out_msatoshi', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM || this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['received_time_str', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
this.displayedColumns = ['received_time', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['received_time_str', 'resolved_time_str', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
this.displayedColumns = ['received_time', 'resolved_time', 'in_channel', 'out_channel', 'in_msatoshi', 'out_msatoshi', 'fee', 'actions'];
}
}
@ -74,6 +74,7 @@ export class CLForwardingHistoryComponent implements OnInit, OnChanges {
loadForwardingEventsTable(forwardingEvents: ForwardingEvent[]) {
this.forwardingHistoryEvents = new MatTableDataSource<ForwardingEvent>([...forwardingEvents]);
this.forwardingHistoryEvents.sort = this.sort;
this.forwardingHistoryEvents.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.forwardingHistoryEvents.paginator = this.paginator;
this.forwardingHistoryEvents.filterPredicate = (event: ForwardingEvent, fltr: string) => {
const newEvent = event.received_time_str + event.resolved_time_str + event.in_channel + event.out_channel + (event.in_msatoshi/1000) + (event.out_msatoshi/1000) + event.fee;

@ -39,10 +39,6 @@ export class CLRoutingComponent implements OnInit, OnDestroy {
ngOnInit() {
this.onEventsFetch();
this.actions$.pipe(takeUntil(this.unSubs[1]), filter((action) => action.type === CLActions.SET_CHANNELS_CL))
.subscribe((action: CLActions.SetChannels) => {
this.onEventsFetch();
});
this.store.select('cl')
.pipe(takeUntil(this.unSubs[0]))
.subscribe((rtlStore) => {

@ -260,6 +260,7 @@ export class CLEffects implements OnDestroy {
.pipe(
map((channels: any) => {
this.logger.info(channels);
this.store.dispatch(new CLActions.GetForwardingHistory());
return {
type: CLActions.SET_CHANNELS_CL,
payload: (channels && channels.length > 0) ? channels : []

@ -167,7 +167,8 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
payments: action.payload
};
case CLActions.SET_FORWARDING_HISTORY_CL:
if (action.payload.forwarding_events) {
const modifiedFeeWithTxCount = state.fees;
if (action.payload.forwarding_events && action.payload.forwarding_events.length > 0) {
const storedChannels = [...state.allChannels];
action.payload.forwarding_events.forEach(event => {
if (storedChannels && storedChannels.length > 0) {
@ -183,12 +184,14 @@ export function CLReducer(state = initCLState, action: CLActions.CLActions) {
}
}
});
modifiedFeeWithTxCount.totalTxCount = action.payload.forwarding_events.filter(event => event.status === 'settled').length;
} else {
action.payload = {};
}
return {
...state,
initialAPIResponseStatus: newAPIStatus,
fee: modifiedFeeWithTxCount,
forwardingHistory: action.payload
};
case CLActions.ADD_INVOICE_CL:

@ -30,7 +30,7 @@
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container w-100">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table fxFlex="100" [dataSource]="invoices" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="expires_at_str">
<ng-container matColumnDef="expires_at">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Expiry Date </th>
<td mat-cell *matCellDef="let invoice">
<span *ngIf="invoice.status === 'paid'" class="dot green" matTooltip="Settled" matTooltipPosition="right" [ngClass]="{'mr-0': screenSize === screenSizeEnum.XS}"></span>
@ -38,7 +38,7 @@
{{invoice.expires_at_str}}
</td>
</ng-container>
<ng-container matColumnDef="paid_at_str">
<ng-container matColumnDef="paid_at">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Paid Date </th>
<td mat-cell *matCellDef="let invoice">{{invoice.paid_at_str}}</td>
</ng-container>

@ -67,16 +67,16 @@ export class CLLightningInvoicesComponent implements OnInit, OnDestroy {
this.screenSize = this.commonService.getScreenSize();
if(this.screenSize === ScreenSizeEnum.XS) {
this.flgSticky = false;
this.displayedColumns = ['expires_at_str', 'msatoshi', 'actions'];
this.displayedColumns = ['expires_at', 'msatoshi', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM) {
this.flgSticky = false;
this.displayedColumns = ['expires_at_str', 'description', 'msatoshi', 'actions'];
this.displayedColumns = ['expires_at', 'description', 'msatoshi', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['expires_at_str', 'description', 'msatoshi', 'actions'];
this.displayedColumns = ['expires_at', 'description', 'msatoshi', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['expires_at_str', 'paid_at_str', 'description', 'msatoshi', 'actions'];
this.displayedColumns = ['expires_at', 'paid_at', 'description', 'msatoshi', 'actions'];
}
}
@ -98,6 +98,7 @@ export class CLLightningInvoicesComponent implements OnInit, OnDestroy {
this.invoices = (rtlStore.invoices.invoices) ? new MatTableDataSource([]) : new MatTableDataSource<Invoice>([...this.invoiceJSONArr]);
this.invoices.data = this.invoiceJSONArr;
this.invoices.sort = this.sort;
this.invoices.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.invoices.paginator = this.paginator;
setTimeout(() => { this.flgAnimate = false; }, 5000);
this.logger.info(this.invoices);

@ -34,7 +34,7 @@
<th mat-header-cell *matHeaderCellDef mat-sort-header>Bolt11</th>
<td mat-cell *matCellDef="let payment" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '10rem' : '30rem'}">{{payment?.bolt11}}</td>
</ng-container>
<ng-container matColumnDef="created_at_str">
<ng-container matColumnDef="created_at">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Created At</th>
<td mat-cell *matCellDef="let payment">
<span *ngIf="payment.status === 'complete'" class="dot green" matTooltip="Completed" matTooltipPosition="right" [ngClass]="{'mr-0': screenSize === screenSizeEnum.XS}"></span>

@ -59,16 +59,16 @@ export class CLLightningPaymentsComponent implements OnInit, OnDestroy {
this.screenSize = this.commonService.getScreenSize();
if(this.screenSize === ScreenSizeEnum.XS) {
this.flgSticky = false;
this.displayedColumns = ['created_at_str', 'actions'];
this.displayedColumns = ['created_at', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM) {
this.flgSticky = false;
this.displayedColumns = ['created_at_str', 'msatoshi', 'actions'];
this.displayedColumns = ['created_at', 'msatoshi', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['created_at_str', 'msatoshi_sent', 'msatoshi', 'actions'];
this.displayedColumns = ['created_at', 'msatoshi_sent', 'msatoshi', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['created_at_str', 'payment_hash', 'msatoshi_sent', 'msatoshi', 'actions'];
this.displayedColumns = ['created_at', 'payment_hash', 'msatoshi_sent', 'msatoshi', 'actions'];
}
}
@ -88,6 +88,7 @@ export class CLLightningPaymentsComponent implements OnInit, OnDestroy {
this.payments = (!rtlStore.payments) ? new MatTableDataSource([]) : new MatTableDataSource<Payment>([...this.paymentJSONArr]);
this.payments.data = this.paymentJSONArr;
this.payments.sort = this.sort;
this.payments.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.payments.paginator = this.paginator;
setTimeout(() => { this.flgAnimate = false; }, 3000);
if (this.flgLoading[0] !== 'error') {

@ -66,6 +66,7 @@ export class CLQueryRoutesComponent implements OnInit, OnDestroy {
this.flgLoading[0] = 'error';
}
this.qrHops.sort = this.sort;
this.qrHops.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
});
}

@ -23,6 +23,7 @@ export class ECLNodeLookupComponent implements OnInit {
this.addresses = this.lookupResult.addresses ? new MatTableDataSource<any>([...this.lookupResult.addresses]) : new MatTableDataSource([]);
this.addresses.data = this.lookupResult.addresses ? this.lookupResult.addresses : [];
this.addresses.sort = this.sort;
this.addresses.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
}
onCopyNodeURI(payload: string) {

@ -13,7 +13,7 @@
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="listTransactions" matSort
[ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="timestampStr">
<ng-container matColumnDef="timestamp">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date/Time </th>
<td mat-cell *matCellDef="let transaction">{{transaction.timestampStr}}</td>
</ng-container>

@ -43,16 +43,16 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
this.screenSize = this.commonService.getScreenSize();
if(this.screenSize === ScreenSizeEnum.XS) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amount', 'actions'];
this.displayedColumns = ['timestamp', 'amount', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amount', 'confirmations', 'fees', 'actions'];
this.displayedColumns = ['timestamp', 'amount', 'confirmations', 'fees', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amount', 'fees', 'confirmations', 'address', 'actions'];
this.displayedColumns = ['timestamp', 'amount', 'fees', 'confirmations', 'address', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['timestampStr', 'amount', 'fees', 'confirmations', 'address', 'actions'];
this.displayedColumns = ['timestamp', 'amount', 'fees', 'confirmations', 'address', 'actions'];
}
}
@ -101,6 +101,7 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
loadTransactionsTable(transactions) {
this.listTransactions = new MatTableDataSource<Transaction>([...transactions]);
this.listTransactions.sort = this.sort;
this.listTransactions.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.listTransactions.paginator = this.paginator;
this.logger.info(this.listTransactions);
}

@ -105,6 +105,7 @@ export class ECLChannelInactiveTableComponent implements OnInit, OnDestroy {
});
this.channels = new MatTableDataSource<Channel>([...this.inactiveChannels]);
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -164,6 +164,7 @@ export class ECLChannelOpenTableComponent implements OnInit, OnDestroy {
});
this.channels = new MatTableDataSource<Channel>([...this.activeChannels]);
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -105,6 +105,7 @@ export class ECLChannelPendingTableComponent implements OnInit, OnDestroy {
});
this.channels = new MatTableDataSource<Channel>([...this.pendingChannels]);
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -81,6 +81,7 @@ export class ECLPeersComponent implements OnInit, OnDestroy {
this.availableBalance = rtlStore.onchainBalance.total || 0;
this.peers = (rtlStore.peers) ? new MatTableDataSource<Peer>([...rtlStore.peers]) : new MatTableDataSource([]);
this.peers.sort = this.sort;
this.peers.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.peers.paginator = this.paginator;
if (this.flgLoading[0] !== 'error') {
this.flgLoading[0] = false;

@ -7,7 +7,7 @@
</div>
<div perfectScrollbar fxLayout="column" fxLayoutAlign="start center" fxFlex="100" class="table-container">
<table mat-table #table [dataSource]="forwardingHistoryEvents" fxFlex="100" matSort class="overflow-auto">
<ng-container matColumnDef="timestampStr">
<ng-container matColumnDef="timestamp">
<th mat-header-cell *matHeaderCellDef mat-sort-header>Date/Time</th>
<td mat-cell *matCellDef="let fhEvent">{{fhEvent?.timestampStr}}</td>
</ng-container>

@ -36,13 +36,13 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges {
this.screenSize = this.commonService.getScreenSize();
if(this.screenSize === ScreenSizeEnum.XS) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amountIn', 'actions'];
this.displayedColumns = ['timestamp', 'amountIn', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM || this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amountIn', 'amountOut', 'actions'];
this.displayedColumns = ['timestamp', 'amountIn', 'amountOut', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['timestampStr', 'amountIn', 'amountOut', 'paymentHash', 'actions'];
this.displayedColumns = ['timestamp', 'amountIn', 'amountOut', 'paymentHash', 'actions'];
}
}
@ -71,6 +71,7 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges {
loadForwardingEventsTable(forwardingEvents: PaymentRelayed[]) {
this.forwardingHistoryEvents = new MatTableDataSource<PaymentRelayed>([...forwardingEvents]);
this.forwardingHistoryEvents.sort = this.sort;
this.forwardingHistoryEvents.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.forwardingHistoryEvents.paginator = this.paginator;
this.forwardingHistoryEvents.filterPredicate = (event: PaymentRelayed, fltr: string) => {
const newEvent = event.amountIn + event.amountOut + event.paymentHash + event.fromChannelId + event.toChannelId + event.timestampStr;

@ -30,7 +30,7 @@
<div perfectScrollbar fxLayout="row" fxLayoutAlign="start center" fxFlex="100" class="table-container w-100">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table fxFlex="100" [dataSource]="invoices" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="timestampStr">
<ng-container matColumnDef="timestamp">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date Created </th>
<td mat-cell *matCellDef="let invoice">
<span *ngIf="invoice.status === 'received'" class="dot green" matTooltip="Received" matTooltipPosition="right" [ngClass]="{'mr-0': screenSize === screenSizeEnum.XS}"></span>
@ -48,7 +48,7 @@
<td mat-cell *matCellDef="let invoice" class="pr-3"><span fxLayoutAlign="end center"> {{invoice.amount | number:'1.0-0'}}
</span></td>
</ng-container>
<ng-container matColumnDef="receivedAtStr">
<ng-container matColumnDef="receivedAt">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date Settled </th>
<td mat-cell *matCellDef="let invoice">{{invoice.receivedAtStr}}</td>
</ng-container>

@ -64,16 +64,16 @@ export class ECLLightningInvoicesComponent implements OnInit, OnDestroy {
this.screenSize = this.commonService.getScreenSize();
if(this.screenSize === ScreenSizeEnum.XS) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'amount', 'actions'];
this.displayedColumns = ['timestamp', 'amount', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.SM) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'description', 'amount', 'actions'];
this.displayedColumns = ['timestamp', 'description', 'amount', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['timestampStr', 'description', 'amount', 'actions'];
this.displayedColumns = ['timestamp', 'description', 'amount', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['timestampStr', 'description', 'amount', 'receivedAtStr', 'actions'];
this.displayedColumns = ['timestamp', 'description', 'amount', 'receivedAt', 'actions'];
}
}
@ -94,6 +94,7 @@ export class ECLLightningInvoicesComponent implements OnInit, OnDestroy {
this.invoices = (rtlStore.invoices) ? new MatTableDataSource([]) : new MatTableDataSource<Invoice>([...this.invoiceJSONArr]);
this.invoices.data = this.invoiceJSONArr;
this.invoices.sort = this.sort;
this.invoices.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.invoices.paginator = this.paginator;
setTimeout(() => { this.flgAnimate = false; }, 5000);
this.logger.info(this.invoices);

@ -88,6 +88,7 @@ export class ECLLightningPaymentsComponent implements OnInit, OnDestroy {
this.payments = new MatTableDataSource<PaymentSent>([...this.paymentJSONArr]);
this.payments.data = this.paymentJSONArr;
this.payments.sort = this.sort;
this.payments.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.payments.paginator = this.paginator;
setTimeout(() => { this.flgAnimate = false; }, 3000);
if (this.flgLoading[0] !== 'error') {

@ -66,6 +66,7 @@ export class ECLQueryRoutesComponent implements OnInit, OnDestroy {
this.flgLoading[0] = 'error';
}
this.qrHops.sort = this.sort;
this.qrHops.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
});
}

@ -67,6 +67,7 @@ export class ChannelBackupTableComponent implements OnInit, OnDestroy {
this.channels.data = rtlStore.allChannels;
}
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.channels.filterPredicate = (channel: Channel, fltr: string) => {
const newChannel = ((channel.active) ? 'active' : 'inactive') + (channel.channel_point ? channel.channel_point : '') + (channel.chan_id ? channel.chan_id : '') +

@ -60,6 +60,7 @@ export class ChannelRestoreTableComponent implements OnInit {
this.channels = new MatTableDataSource([...resRCList.files]);
this.channels.data = resRCList.files;
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
if (this.flgLoading[0] !== 'error' || (resRCList && resRCList.files)) {
this.flgLoading[0] = false;

@ -113,14 +113,13 @@ export class LoopModalComponent implements OnInit, AfterViewInit, OnDestroy {
this.addressFormGroup.setErrors({'Invalid': true});
}
onLoop() {
if(!this.inputFormGroup.controls.amount.value || this.inputFormGroup.controls.amount.value < this.minQuote.amount || this.inputFormGroup.controls.amount.value > this.maxQuote.amount || !this.inputFormGroup.controls.sweepConfTarget.value || this.inputFormGroup.controls.sweepConfTarget.value < 2 || (!this.inputFormGroup.controls.routingFeePercent.value || this.inputFormGroup.controls.routingFeePercent.value < 0 || this.inputFormGroup.controls.routingFeePercent.value > this.maxRoutingFeePercentage) || (this.direction === SwapTypeEnum.LOOP_OUT && this.addressFormGroup.controls.addressType.value === 'external' && (!this.addressFormGroup.controls.address.value || this.addressFormGroup.controls.address.value.trim() === ''))) { return true; }
this.flgEditable = false;
this.stepper.selected.stepControl.setErrors(null);
this.stepper.next();
if (this.direction === SwapTypeEnum.LOOP_IN) {
this.loopService.loopIn(this.inputFormGroup.controls.amount.value, +this.quote.swap_fee, +this.quote.miner_fee, '', true).pipe(takeUntil(this.unSubs[0]))
this.loopService.loopIn(this.inputFormGroup.controls.amount.value, +this.quote.swap_fee_sat, +this.quote.htlc_publish_fee_sat, '', true).pipe(takeUntil(this.unSubs[0]))
.subscribe((loopStatus: any) => {
this.loopStatus = JSON.parse(loopStatus);
this.store.dispatch(new LNDActions.FetchLoopSwaps());
@ -134,7 +133,7 @@ export class LoopModalComponent implements OnInit, AfterViewInit, OnDestroy {
let swapRoutingFee = this.inputFormGroup.controls.amount.value * (this.inputFormGroup.controls.routingFeePercent.value / 100);
let destAddress = this.addressFormGroup.controls.addressType.value === 'external' ? this.addressFormGroup.controls.address.value : '';
let swapPublicationDeadline = this.inputFormGroup.controls.fast.value ? 0 : new Date().getTime() + (30 * 60000);
this.loopService.loopOut(this.inputFormGroup.controls.amount.value, (this.channel && this.channel.chan_id ? this.channel.chan_id : ''), this.inputFormGroup.controls.sweepConfTarget.value, swapRoutingFee, +this.quote.miner_fee, this.prepayRoutingFee, +this.quote.prepay_amt, +this.quote.swap_fee, swapPublicationDeadline, destAddress).pipe(takeUntil(this.unSubs[1]))
this.loopService.loopOut(this.inputFormGroup.controls.amount.value, (this.channel && this.channel.chan_id ? this.channel.chan_id : ''), this.inputFormGroup.controls.sweepConfTarget.value, swapRoutingFee, +this.quote.htlc_sweep_fee_sat, this.prepayRoutingFee, +this.quote.prepay_amt_sat, +this.quote.swap_fee_sat, swapPublicationDeadline, destAddress).pipe(takeUntil(this.unSubs[1]))
.subscribe((loopStatus: any) => {
this.loopStatus = JSON.parse(loopStatus);
this.store.dispatch(new LNDActions.FetchLoopSwaps());
@ -204,8 +203,8 @@ export class LoopModalComponent implements OnInit, AfterViewInit, OnDestroy {
} else {
this.inputFormLabel = 'Amount to ' + this.loopDirectionCaption;
}
if (this.quote && this.quote.swap_fee && this.quote.miner_fee && this.quote.prepay_amt) {
this.quoteFormLabel = 'Quote confirmed | Estimated Fees: ' + this.decimalPipe.transform(+this.quote.swap_fee + +this.quote.miner_fee) + ' Sats';
if (this.quote && this.quote.swap_fee_sat && (this.quote.htlc_sweep_fee_sat || this.quote.htlc_publish_fee_sat) && this.quote.prepay_amt_sat) {
this.quoteFormLabel = 'Quote confirmed | Estimated Fees: ' + this.decimalPipe.transform(+this.quote.swap_fee_sat + +(this.quote.htlc_sweep_fee_sat ? this.quote.htlc_sweep_fee_sat : this.quote.htlc_publish_fee_sat ? this.quote.htlc_publish_fee_sat : 0)) + ' Sats';
} else {
this.quoteFormLabel = 'Quote confirmed';
}

@ -1,7 +1,7 @@
<ng-container *ngTemplateOutlet="showPanel ? expansionPanelBlock : quoteDetailsBlock"></ng-container>
<ng-template #expansionPanelBlock>
<ng-container *ngTemplateOutlet="quote?.miner_fee < 0 ? errorBlock : informationBlock"></ng-container>
</ng-template>
<ng-container *ngTemplateOutlet="showPanel ? informationBlock : quoteDetailsBlock"></ng-container>
<!-- <ng-template #expansionPanelBlock>
<ng-container *ngTemplateOutlet="quote?.htlc_sweep_fee_sat < 0 ? errorBlock : informationBlock"></ng-container>
</ng-template> -->
<ng-template #informationBlock>
<mat-expansion-panel class="flat-expansion-panel mb-1" fxFlex="100" [expanded]="panelExpanded" [ngClass]="{'h-5':!flgShowPanel}">
<mat-expansion-panel-header>
@ -15,17 +15,17 @@
<ng-template #quoteDetailsBlock>
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch">
<div fxLayout="row">
<div fxFlex="30" matTooltip="Estimated fee charged by the loop server for the swap">
<div [fxFlex]="quote?.prepay_amt_sat ? '30' : '50'" matTooltip="Estimated fee charged by the loop server for the swap">
<h4 fxLayoutAlign="start" class="font-bold-500">Swap Fee (Sats)</h4>
<span class="foreground-secondary-text">{{quote?.swap_fee | number}}</span>
<span class="foreground-secondary-text">{{quote?.swap_fee_sat | number}}</span>
</div>
<div fxFlex="30" matTooltip="An estimate of the on-chain fee that needs to be paid to sweep the HTLC">
<h4 fxLayoutAlign="start" class="font-bold-500">Miner Fee (Sats)</h4>
<span class="foreground-secondary-text">{{quote?.miner_fee | number}}</span>
<div [fxFlex]="quote?.prepay_amt_sat ? '30' : '50'" matTooltip="An estimate of the on-chain fee that needs to be paid to sweep the HTLC">
<h4 fxLayoutAlign="start" class="font-bold-500">{{quote?.htlc_sweep_fee_sat ? 'HTLC Sweep Fee (Sats)' : quote?.htlc_publish_fee_sat ? 'HTLC Publish Fee (Sats)' : ''}}</h4>
<span class="foreground-secondary-text">{{(quote?.htlc_sweep_fee_sat ? quote.htlc_sweep_fee_sat : quote?.htlc_publish_fee_sat ? quote.htlc_publish_fee_sat : 0) | number}}</span>
</div>
<div fxFlex="40" matTooltip="The part of the swap fee that is requested as a prepayment">
<div fxFlex="40" matTooltip="The part of the swap fee that is requested as a prepayment" *ngIf="quote?.prepay_amt_sat">
<h4 fxLayoutAlign="start" class="font-bold-500">Prepay Amount (Sats)</h4>
<span class="foreground-secondary-text">{{quote?.prepay_amt | number}}</span>
<span class="foreground-secondary-text">{{quote?.prepay_amt_sat | number}}</span>
</div>
</div>
<mat-divider class="w-100 my-1"></mat-divider>
@ -48,7 +48,7 @@
</div>
</div>
</ng-template>
<ng-template #errorBlock>
<!-- <ng-template #errorBlock>
<mat-expansion-panel class="flat-expansion-panel mb-1" fxFlex="100" [disabled]="true" [ngClass]="{'h-5':!flgShowPanel}">
<mat-expansion-panel-header>
<mat-panel-title>
@ -56,4 +56,4 @@
</mat-panel-title>
</mat-expansion-panel-header>
</mat-expansion-panel>
</ng-template>
</ng-template> -->

@ -12,11 +12,11 @@
<div perfectScrollbar class="table-container" fxFlex="100">
<mat-progress-bar *ngIf="flgLoading[0]===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="listSwaps" matSort [ngClass]="{'overflow-auto error-border': flgLoading[0]==='error','overflow-auto': true}">
<ng-container matColumnDef="initiation_time_str">
<ng-container matColumnDef="initiation_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Initiation Time </th>
<td mat-cell *matCellDef="let swap">{{swap.initiation_time_str}}</td>
</ng-container>
<ng-container matColumnDef="last_update_time_str">
<ng-container matColumnDef="last_update_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Last Update Time </th>
<td mat-cell *matCellDef="let swap">{{swap.last_update_time_str}}</td>
</ng-container>

@ -55,10 +55,10 @@ export class SwapsComponent implements OnInit, OnChanges, OnDestroy {
this.displayedColumns = ['state', 'amt', 'actions'];
} else if(this.screenSize === ScreenSizeEnum.MD) {
this.flgSticky = false;
this.displayedColumns = ['state', 'initiation_time_str', 'amt', 'actions'];
this.displayedColumns = ['state', 'initiation_time', 'amt', 'actions'];
} else {
this.flgSticky = true;
this.displayedColumns = ['state', 'initiation_time_str', 'amt', 'cost_server', 'cost_offchain', 'cost_onchain', 'actions'];
this.displayedColumns = ['state', 'initiation_time', 'amt', 'cost_server', 'cost_offchain', 'cost_onchain', 'actions'];
}
}
@ -119,6 +119,7 @@ export class SwapsComponent implements OnInit, OnChanges, OnDestroy {
loadSwapsTable(swaps) {
this.listSwaps = new MatTableDataSource<SwapStatus>([...swaps]);
this.listSwaps.sort = this.sort;
this.listSwaps.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.listSwaps.paginator = this.paginator;
this.logger.info(this.listSwaps);
}

@ -103,6 +103,7 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnDestroy {
loadTransactionsTable(transactions) {
this.listTransactions = new MatTableDataSource<Transaction>([...transactions]);
this.listTransactions.sort = this.sort;
this.listTransactions.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.listTransactions.paginator = this.paginator;
this.logger.info(this.listTransactions);
}

@ -102,6 +102,7 @@ export class ChannelClosedTableComponent implements OnInit, OnDestroy {
loadClosedChannelsTable(closedChannels) {
this.closedChannels = new MatTableDataSource<ClosedChannel>([...closedChannels]);
this.closedChannels.sort = this.sort;
this.closedChannels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.closedChannels.paginator = this.paginator;
this.logger.info(this.closedChannels);
}

@ -235,6 +235,7 @@ export class ChannelOpenTableComponent implements OnInit, OnDestroy {
return newChannel.includes(fltr);
};
this.channels.sort = this.sort;
this.channels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.channels.paginator = this.paginator;
this.logger.info(this.channels);
}

@ -195,6 +195,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.pendingOpenChannelsLength = (channels.length) ? channels.length : 0;
this.pendingOpenChannels = new MatTableDataSource<Channel>([...channels]);
this.pendingOpenChannels.sort = this.sort;
this.pendingOpenChannels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.logger.info(this.pendingOpenChannels);
}
@ -205,6 +206,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.pendingForceClosingChannelsLength = (channels.length) ? channels.length : 0;
this.pendingForceClosingChannels = new MatTableDataSource<Channel>([...channels]);
this.pendingForceClosingChannels.sort = this.sort;
this.pendingForceClosingChannels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.logger.info(this.pendingForceClosingChannels);
}
@ -215,6 +217,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.pendingClosingChannelsLength = (channels.length) ? channels.length : 0;
this.pendingClosingChannels = new MatTableDataSource<Channel>([...channels]);
this.pendingClosingChannels.sort = this.sort;
this.pendingClosingChannels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.logger.info(this.pendingClosingChannels);
}
@ -225,6 +228,7 @@ export class ChannelPendingTableComponent implements OnInit, OnDestroy {
this.pendingWaitClosingChannelsLength = (channels.length) ? channels.length : 0;
this.pendingWaitClosingChannels = new MatTableDataSource<Channel>([...channels]);
this.pendingWaitClosingChannels.sort = this.sort;
this.pendingWaitClosingChannels.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.logger.info(this.pendingWaitClosingChannels);
}

@ -80,7 +80,9 @@ export class PeersComponent implements OnInit, OnDestroy {
this.peers.data = rtlStore.peers;
}
this.peers.sort = this.sort;
this.peers.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.peers.paginator = this.paginator;
this.peers.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
if (this.flgLoading[0] !== 'error') {
this.flgLoading[0] = false;
}

@ -73,6 +73,7 @@ export class ForwardingHistoryComponent implements OnInit, OnChanges {
loadForwardingEventsTable(forwardingEvents: ForwardingEvent[]) {
this.forwardingHistoryEvents = new MatTableDataSource<ForwardingEvent>([...forwardingEvents]);
this.forwardingHistoryEvents.sort = this.sort;
this.forwardingHistoryEvents.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.forwardingHistoryEvents.paginator = this.paginator;
this.logger.info(this.forwardingHistoryEvents);
}

@ -128,6 +128,7 @@ export class LightningInvoicesComponent implements OnInit, OnDestroy {
loadInvoicesTable(invoices) {
this.invoices = new MatTableDataSource<Invoice>([...invoices]);
this.invoices.sort = this.sort;
this.invoices.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
setTimeout(() => { this.flgAnimate = false; }, 5000);
this.logger.info(this.invoices);
}

@ -96,6 +96,7 @@ export class LightningPaymentsComponent implements OnInit, OnDestroy {
this.payments = (rtlStore.payments) ? new MatTableDataSource([]) : new MatTableDataSource<Payment>([...this.paymentJSONArr]);
this.payments.data = this.paymentJSONArr;
this.payments.sort = this.sort;
this.payments.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
this.payments.paginator = this.paginator;
setTimeout(() => { this.flgAnimate = false; }, 3000);
if (this.flgLoading[0] !== 'error') {

@ -65,6 +65,7 @@ export class QueryRoutesComponent implements OnInit, OnDestroy {
this.flgLoading[0] = 'error';
}
this.qrHops.sort = this.sort;
this.qrHops.sortingDataAccessor = (data, sortHeaderId) => data[sortHeaderId].toLocaleLowerCase();
});
}

@ -5,9 +5,10 @@ export interface LoopTerms {
export interface LoopQuote {
amount?: number;
swap_fee?: string;
miner_fee?: string;
prepay_amt?: string;
swap_fee_sat?: string;
htlc_sweep_fee_sat?: string;
htlc_publish_fee_sat?: string;
prepay_amt_sat?: string;
cltv_delta?: number;
swap_payment_dest?: string;
off_chain_swap_routing_fee_percentage?: number;

Loading…
Cancel
Save