mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-10-31 09:20:27 +00:00
1 line
667 KiB
JavaScript
1 line
667 KiB
JavaScript
|
"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[636],{1636:(lC,Dt,g)=>{g.r(Dt),g.d(Dt,{LNDModule:()=>ye});var p=g(6895),T=g(9116),nn=g(8878),e=g(4650),m=g(1576),J=g(3162);function an(i,n){1&i&&e._UZ(0,"mat-progress-bar",3)}class ae{constructor(n){this.router=n,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof T.OD:this.loading=!0;break;case t instanceof T.m2:case t instanceof T.gk:case t instanceof T.Q3:this.loading=!1}})}}ae.\u0275fac=function(n){return new(n||ae)(e.Y36(T.F0))},ae.\u0275cmp=e.Xpm({type:ae,selectors:[["rtl-lnd-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e.YNc(1,an,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&n&&(e.xp6(1),e.Q6J("ngIf",t.loading))},dependencies:[p.O5,m.xw,m.Wh,m.yH,J.pW,T.lC],data:{animation:[nn.g]}});var u=g(7579),d=g(2722),Q=g(9300),Qt=g(3396),y=g(2687),s=g(7731),f=g(6529),k=g(5043),L=g(9653),z=g(493),I=g(62),M=g(2216),q=g(5829),N=g(4859),b=g(3546),xt=g(782),te=g(7392),wt=g(8255),O=g(3848),F=g(8739),A=g(6308),r=g(671),D=g(7274),Z=g(6523),c=g(4006),P=g(4144),h=g(9549),S=g(4385),E=g(3238),yt=g(455),W=g(266),X=g(3390),j=g(6534);function on(i,n){if(1&i&&(e.TgZ(0,"mat-option",28),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&i){const t=n.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(e.lcZ(2,2,t))}}function sn(i,n){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.invoiceError)}}function ln(i,n){if(1&i&&(e.TgZ(0,"div",29),e._UZ(1,"fa-icon",30),e.YNc(2,sn,2,1,"span",31),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.invoiceError)}}class Te{constructor(n,t,a,o,l,_){this.dialogRef=n,this.data=t,this.store=a,this.decimalPipe=o,this.commonService=l,this.actions=_,this.faExclamationTriangle=y.eHv,this.selNode={},this.memo="",this.isAmp=!1,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=s.IV,this.timeUnitEnum=s.Qk,this.timeUnits=s.LO,this.selTimeUnit=s.Qk.SECS,this.invoiceError="",this.unSubs=[new u.x,new u.x,new u.x,new u.x,new u.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(f.$k).pipe((0,d.R)(this.unSubs[0])).subscribe(n=>{this.selNode=n}),this.store.select(f.Q5).pipe((0,d.R)(this.unSubs[1])).subscribe(n=>{this.information=n}),this.actions.pipe((0,d.R)(this.unSubs[2]),(0,Q.h)(n=>n.type===s.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(n=>{n.type===s.uR.UPDATE_API_CALL_STATUS_LND&&"SaveNewInvoice"===n.payload.action&&(this.invoiceError=n.payload.message,n.payload.status===s.Bn.ERROR&&(this.invoiceError=n.payload.message),n.payload.status===s.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(n){this.invoiceError="";let t=0;t=this.expiry?this.selTimeUnit!==s.Qk.SECS?this.commonService.convertTime(this.expiry,this.selTimeUnit,s.Qk.SECS):this.expiry:3600,this.store.dispatch((0,Z.Rd)({payload:{uiMessage:s.m6.ADD_INVOICE,memo:this.memo,value:this.invoiceValue,private:this.private,expiry:t,is_amp:this.isAmp,pageSize:this.pageSize,openModal:!0}}))}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.isAmp=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=s.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,s.NT.SATS,s.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,d.R)(this.unSubs[3])).subscribe({next:n=>{this.invoiceValueHint="= "+n.symbol+this.decimalPipe.transform(n.OTHER,s.Xz.OTHER)+" "+n.unit},error:n=>{this.invoiceValueHint="Conversion Error: "+n}}))}onTimeUnitChange(n){this.expiry&&this.selTimeUnit!==n.value&&(this.expiry=this.comm
|