mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
CLN Transactions page load bug fix
CLN Transactions page load bug fix
This commit is contained in:
parent
e2eeb8b919
commit
c16913402b
@ -21,7 +21,6 @@ export class LoggerService {
|
||||
case 'WARN':
|
||||
msgStr = prepMsgData(msgJSON, msgStr);
|
||||
if (!msgJSON.selectedNode || msgJSON.selectedNode.log_level === 'WARN' || msgJSON.selectedNode.log_level === 'INFO' || msgJSON.selectedNode.log_level === 'DEBUG') {
|
||||
console.warn(msgStr);
|
||||
if (msgJSON.selectedNode && msgJSON.selectedNode.log_file) {
|
||||
fs.appendFile(msgJSON.selectedNode.log_file, msgStr, () => { });
|
||||
}
|
||||
|
1
frontend/564.be9ebe6c4e3faeaa.js
Normal file
1
frontend/564.be9ebe6c4e3faeaa.js
Normal file
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
1
frontend/636.8c8e515a2dc3c81e.js
Normal file
1
frontend/636.8c8e515a2dc3c81e.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
frontend/924.a2489290b287f550.js
Normal file
1
frontend/924.a2489290b287f550.js
Normal file
File diff suppressed because one or more lines are too long
@ -13,6 +13,6 @@
|
||||
<style>@font-face{font-family:Roboto;src:url(Roboto-Thin.f7a95c9c5999532c.woff2) format("woff2"),url(Roboto-Thin.c13c157cb81e8ebb.woff) format("woff");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-ThinItalic.b0e084abf689f393.woff2) format("woff2"),url(Roboto-ThinItalic.1111028df6cea564.woff) format("woff");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Light.0e01b6cd13b3857f.woff2) format("woff2"),url(Roboto-Light.603ca9a537b88428.woff) format("woff");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-LightItalic.232ef4b20215f720.woff2) format("woff2"),url(Roboto-LightItalic.1b5e142f787151c8.woff) format("woff");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Regular.475ba9e4e2d63456.woff2) format("woff2"),url(Roboto-Regular.bcefbfee882bc1cb.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-RegularItalic.e3a9ebdaac06bbc4.woff2) format("woff2"),url(Roboto-RegularItalic.0668fae6af0cf8c2.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Medium.457532032ceb0168.woff2) format("woff2"),url(Roboto-Medium.6e1ae5f0b324a0aa.woff) format("woff");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-MediumItalic.872f7060602d55d2.woff2) format("woff2"),url(Roboto-MediumItalic.e06fb533801cbb08.woff) format("woff");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Bold.447291a88c067396.woff2) format("woff2"),url(Roboto-Bold.fc482e6133cf5e26.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BoldItalic.1b15168ef6fa4e16.woff2) format("woff2"),url(Roboto-BoldItalic.e26ba339b06f09f7.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(Roboto-Black.2eaa390d458c877d.woff2) format("woff2"),url(Roboto-Black.b25f67ad8583da68.woff) format("woff");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(Roboto-BlackItalic.7dc03ee444552bc5.woff2) format("woff2"),url(Roboto-BlackItalic.c8dc642467cb3099.woff) format("woff");font-weight:900;font-style:italic}html{width:100%;height:99%;line-height:1.5;overflow-x:hidden;font-family:Roboto,sans-serif!important;font-size:62.5%}body{box-sizing:border-box;height:100%;margin:0;overflow:hidden}*{margin:0;padding:0}</style><link rel="stylesheet" href="styles.43515fc39338348b.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.43515fc39338348b.css"></noscript></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.2e2a4c6d6e08e8f6.js" type="module"></script><script src="polyfills.eddc63f1737a019a.js" type="module"></script><script src="main.053a5650605ae39e.js" type="module"></script>
|
||||
<script src="runtime.4665fe090c507b74.js" type="module"></script><script src="polyfills.eddc63f1737a019a.js" type="module"></script><script src="main.4ce8058ec57eb017.js" type="module"></script>
|
||||
|
||||
</body></html>
|
File diff suppressed because one or more lines are too long
1
frontend/main.4ce8058ec57eb017.js
Normal file
1
frontend/main.4ce8058ec57eb017.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,f,o]=e[i],s=!0,u=0;u<t.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every(b=>r.O[b](t[u]))?t.splice(u--,1):(s=!1,o<a&&(a=o));if(s){e.splice(i--,1);var l=f();void 0!==l&&(n=l)}}return n}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{564:"fa1444f039e187d7",636:"76f584200eef7ef5",893:"9a615c46b89a5a79",924:"232c129a40707864"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,o,i)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+o){a=d;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[f];var c=(m,b)=>{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)o.push(i[2]);else if(666!=f){var a=new Promise((d,c)=>i=e[f]=[d,c]);o.push(i[2]=a);var s=r.p+r.u(f),u=new Error;r.l(s,d=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var c=d&&("load"===d.type?"missing":d.type),p=d&&d.target&&d.target.src;u.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",u.name="ChunkLoadError",u.type=c,u.request=p,i[1](u)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var u,l,[i,a,s]=o,d=0;if(i.some(p=>0!==e[p])){for(u in a)r.o(a,u)&&(r.m[u]=a[u]);if(s)var c=s(r)}for(f&&f(o);d<i.length;d++)r.o(e,l=i[d])&&e[l]&&e[l][0](),e[l]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
|
||||
(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,f,o]=e[i],s=!0,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(i--,1);var l=f();void 0!==l&&(n=l)}}return n}o=o||0;for(var i=e.length;i>0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{564:"be9ebe6c4e3faeaa",636:"8c8e515a2dc3c81e",893:"9a615c46b89a5a79",924:"a2489290b287f550"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,o,i)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==o)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var u=d[l];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==n+o){a=u;break}}a||(s=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[f];var c=(m,b)=>{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)o.push(i[2]);else if(666!=f){var a=new Promise((u,c)=>i=e[f]=[u,c]);o.push(i[2]=a);var s=r.p+r.u(f),d=new Error;r.l(s,u=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var c=u&&("load"===u.type?"missing":u.type),p=u&&u.target&&u.target.src;d.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,i[1](d)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var d,l,[i,a,s]=o,u=0;if(i.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(f&&f(o);u<i.length;u++)r.o(e,l=i[u])&&e[l]&&e[l][0](),e[l]=0;return r.O(c)},t=self.webpackChunkRTLApp=self.webpackChunkRTLApp||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "rtl",
|
||||
"version": "0.13.0-beta",
|
||||
"version": "0.13.1-beta",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "rtl",
|
||||
"version": "0.13.0-beta",
|
||||
"version": "0.13.1-beta",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/animations": "~13.3.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rtl",
|
||||
"version": "0.13.0-beta",
|
||||
"version": "0.13.1-beta",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
@ -23,7 +23,6 @@ export class LoggerService {
|
||||
case 'WARN':
|
||||
msgStr = prepMsgData(msgJSON, msgStr);
|
||||
if (!msgJSON.selectedNode || msgJSON.selectedNode.log_level === 'WARN' || msgJSON.selectedNode.log_level === 'INFO' || msgJSON.selectedNode.log_level === 'DEBUG') {
|
||||
console.warn(msgStr);
|
||||
if (msgJSON.selectedNode && msgJSON.selectedNode.log_file) {
|
||||
fs.appendFile(msgJSON.selectedNode.log_file, msgStr, () => { });
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="bordered-box">
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="bordered-box my-2">
|
||||
<mat-tab-group [selectedIndex]="selectedTableIndex" (selectedIndexChange)="onSelectedIndexChanged($event)">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<nav mat-tab-nav-bar>
|
||||
<div role="tab" mat-tab-link *ngFor="let link of links" class="mat-tab-label" [active]="activeLink === link.link" (click)="activeLink = link.link" routerLink="{{link.link}}">{{link.name}}</div>
|
||||
</nav>
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="mat-tab-body-wrapper">
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="mat-tab-body-wrapper mb-2">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
@ -95,7 +95,7 @@ export const addInvoice = createAction(CLNActions.ADD_INVOICE_CLN, props<{ paylo
|
||||
|
||||
export const updateInvoice = createAction(CLNActions.UPDATE_INVOICE_CLN, props<{ payload: Invoice }>());
|
||||
|
||||
export const deleteExpiredInvoice = createAction(CLNActions.DELETE_EXPIRED_INVOICE_CLN, props<{ payload?: number }>());
|
||||
export const deleteExpiredInvoice = createAction(CLNActions.DELETE_EXPIRED_INVOICE_CLN, props<{ payload?: number | null }>());
|
||||
|
||||
export const setChannelTransaction = createAction(CLNActions.SET_CHANNEL_TRANSACTION_CLN, props<{ payload: OnChain }>());
|
||||
|
||||
|
@ -96,7 +96,7 @@ export class CLNCreateInvoiceComponent implements OnInit, OnDestroy {
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -43,8 +43,8 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
public newlyAddedInvoiceMemo = '';
|
||||
public newlyAddedInvoiceValue = 0;
|
||||
public description = '';
|
||||
public expiry: number;
|
||||
public invoiceValue: number = null;
|
||||
public expiry: number | null;
|
||||
public invoiceValue: number | null = null;
|
||||
public invoiceValueHint = '';
|
||||
public displayedColumns: any[] = [];
|
||||
public invoicePaymentReq = '';
|
||||
@ -82,8 +82,8 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: SelNodeChild) => {
|
||||
this.selNode = nodeSettings;
|
||||
this.store.select(clnNodeSettings).pipe(takeUntil(this.unSubs[0])).subscribe((nodeSettings: SelNodeChild | null) => {
|
||||
this.selNode = <SelNodeChild>nodeSettings;
|
||||
});
|
||||
this.store.select(clnNodeInformation).pipe(takeUntil(this.unSubs[1])).subscribe((nodeInfo: GetInfo) => {
|
||||
this.information = nodeInfo;
|
||||
@ -195,9 +195,9 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
}
|
||||
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue! > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue!, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[5])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
@ -210,7 +210,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
}
|
||||
|
||||
onRefreshInvoice(selInvoice: Invoice) {
|
||||
this.store.dispatch(invoiceLookup({ payload: selInvoice.label }));
|
||||
this.store.dispatch(invoiceLookup({ payload: selInvoice.label! }));
|
||||
}
|
||||
|
||||
updateInvoicesData(newInvoice: Invoice) {
|
||||
@ -222,7 +222,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
this.invoices.sortingDataAccessor = (data: any, sortHeaderId: string) => ((data[sortHeaderId] && isNaN(data[sortHeaderId])) ? data[sortHeaderId].toLocaleLowerCase() : data[sortHeaderId] ? +data[sortHeaderId] : null);
|
||||
this.invoices.sort = this.sort;
|
||||
this.invoices.filterPredicate = (rowData: Invoice, fltr: string) => {
|
||||
const newRowData = ((rowData.paid_at) ? this.datePipe.transform(new Date(rowData.paid_at * 1000), 'dd/MMM/YYYY HH:mm').toLowerCase() : '') + ((rowData.expires_at) ? this.datePipe.transform(new Date(rowData.expires_at * 1000), 'dd/MMM/YYYY HH:mm').toLowerCase() : '') + ((rowData.bolt12) ? 'bolt12' : (rowData.bolt11) ? 'bolt11' : 'keysend') + JSON.stringify(rowData).toLowerCase();
|
||||
const newRowData = this.datePipe.transform(new Date((rowData.paid_at || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase()! + (this.datePipe.transform(new Date((rowData.expires_at || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase()) + ((rowData.bolt12) ? 'bolt12' : (rowData.bolt11) ? 'bolt11' : 'keysend') + JSON.stringify(rowData).toLowerCase();
|
||||
return newRowData.includes(fltr);
|
||||
};
|
||||
this.invoices.paginator = this.paginator;
|
||||
|
@ -79,7 +79,7 @@ export class CLNCreateOfferComponent implements OnInit, OnDestroy {
|
||||
onOfferValueChange() {
|
||||
if (this.selNode.fiatConversion && this.offerValue > 99) {
|
||||
this.offerValueHint = '';
|
||||
this.commonService.convertCurrency(this.offerValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.offerValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -97,7 +97,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message;
|
||||
}
|
||||
this.paymentJSONArr = paymentsSeletor.payments || [];
|
||||
if (this.paymentJSONArr.length > 0) {
|
||||
if (this.paymentJSONArr.length > 0 && this.sort && this.paginator) {
|
||||
this.loadPaymentsTable(this.paymentJSONArr);
|
||||
}
|
||||
this.logger.info(paymentsSeletor);
|
||||
@ -105,7 +105,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if (this.paymentJSONArr.length > 0) {
|
||||
if (this.paymentJSONArr.length > 0 && this.sort && this.paginator) {
|
||||
this.loadPaymentsTable(this.paymentJSONArr);
|
||||
}
|
||||
}
|
||||
@ -291,7 +291,6 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
|
||||
loadPaymentsTable(payments: Payment[]) {
|
||||
this.payments = (payments) ? new MatTableDataSource<Payment>([...payments]) : new MatTableDataSource([]);
|
||||
this.payments.data = this.paymentJSONArr;
|
||||
this.payments.sort = this.sort;
|
||||
this.payments.sortingDataAccessor = (data: any, sortHeaderId: string) => ((data[sortHeaderId] && isNaN(data[sortHeaderId])) ? data[sortHeaderId].toLocaleLowerCase() : data[sortHeaderId] ? +data[sortHeaderId] : null);
|
||||
this.payments.filterPredicate = (rowData: Payment, fltr: string) => {
|
||||
|
@ -310,7 +310,7 @@ export class CLNLightningSendPaymentsComponent implements OnInit, OnDestroy {
|
||||
this.offerDescription = this.offerDecoded.description;
|
||||
this.offerVendor = this.offerDecoded.vendor ? this.offerDecoded.vendor : this.offerDecoded.issuer ? this.offerDecoded.issuer : '';
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(this.offerAmount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.offerAmount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[7])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
@ -333,7 +333,7 @@ export class CLNLightningSendPaymentsComponent implements OnInit, OnDestroy {
|
||||
} else {
|
||||
this.zeroAmtInvoice = false;
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(this.paymentDecoded.msatoshi ? this.paymentDecoded.msatoshi / 1000 : 0, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.paymentDecoded.msatoshi ? this.paymentDecoded.msatoshi / 1000 : 0, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[8])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -100,7 +100,7 @@ export class ECLCreateInvoiceComponent implements OnInit, OnDestroy {
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -191,7 +191,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[4])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -261,7 +261,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
this.paymentDecoded = decodedPayment;
|
||||
if (this.paymentDecoded.amount) {
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -92,7 +92,7 @@ export class ECLLightningSendPaymentsComponent implements OnInit, OnDestroy {
|
||||
} else {
|
||||
this.zeroAmtInvoice = false;
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[2])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
@ -141,7 +141,7 @@ export class ECLLightningSendPaymentsComponent implements OnInit, OnDestroy {
|
||||
} else {
|
||||
this.zeroAmtInvoice = false;
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.amount, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -89,7 +89,7 @@ export class CreateInvoiceComponent implements OnInit, OnDestroy {
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[3])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -199,7 +199,7 @@ export class LightningInvoicesComponent implements OnInit, AfterViewInit, OnDest
|
||||
onInvoiceValueChange() {
|
||||
if (this.selNode.fiatConversion && this.invoiceValue > 99) {
|
||||
this.invoiceValueHint = '';
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(this.invoiceValue, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[4])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -237,7 +237,7 @@ export class LightningPaymentsComponent implements OnInit, AfterViewInit, OnDest
|
||||
}
|
||||
if (this.paymentDecoded.num_satoshis) {
|
||||
if (this.selNode.fiatConversion) {
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, this.selNode.currencyUnits[2], this.selNode.fiatConversion).
|
||||
this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis, CurrencyUnitEnum.SATS, CurrencyUnitEnum.OTHER, (this.selNode.currencyUnits && this.selNode.currencyUnits.length > 2 ? this.selNode.currencyUnits[2] : ''), this.selNode.fiatConversion).
|
||||
pipe(takeUntil(this.unSubs[5])).
|
||||
subscribe({
|
||||
next: (data) => {
|
||||
|
@ -11,7 +11,7 @@
|
||||
<div role="tab" mat-tab-link *ngIf="selNode?.lnImplementation?.toUpperCase() === 'CLN'" class="mat-tab-label" [active]="activeLink === links[2].link" (click)="activeLink = links[2].link" routerLink="{{links[2].link}}">{{links[2].name}}</div>
|
||||
<div role="tab" mat-tab-link *ngIf="showLnConfig" class="mat-tab-label" [active]="activeLink === links[3].link" (click)="activeLink = links[3].link" routerLink="{{links[3].link}}">{{links[3].name}}</div>
|
||||
</nav>
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="mat-tab-body-wrapper">
|
||||
<div fxLayout="column" fxFlex="100" fxLayoutAlign="space-between stretch" class="mat-tab-body-wrapper mb-2">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
@ -27,4 +27,4 @@ export const environment = {
|
||||
Web_SOCKET_API: '/ws'
|
||||
};
|
||||
|
||||
export const VERSION = '0.13.0-beta';
|
||||
export const VERSION = '0.13.1-beta';
|
||||
|
@ -27,4 +27,4 @@ export const environment = {
|
||||
Web_SOCKET_API: '/ws'
|
||||
};
|
||||
|
||||
export const VERSION = '0.13.0-beta';
|
||||
export const VERSION = '0.13.1-beta';
|
||||
|
Loading…
Reference in New Issue
Block a user