@dcl/vesting-dashboard 3.8.0 → 3.8.1-27021055025.commit-110ffa1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{basic-71b752f4.js → basic-f0617d8e.js} +1 -1
- package/assets/{core-4faee1c5.js → core-31531cbc.js} +3 -3
- package/assets/{features-9e115e67.js → features-89f461b0.js} +1 -1
- package/assets/{fortmatic-a2f74f79.js → fortmatic-428e26c6.js} +1 -1
- package/assets/{index-7b29924c.js → index-12f80a5c.js} +1 -1
- package/assets/{index-416f2a23.js → index-35f685f6.js} +1 -1
- package/assets/{index-fc294794.js → index-49b522eb.js} +1 -1
- package/assets/{index-26cb9523.css → index-4c6a0cc5.css} +7 -7
- package/assets/{index-f2910622.js → index-918b1cc6.js} +1 -1
- package/assets/{index-5365642e.js → index-a090d924.js} +2 -2
- package/assets/{index-79609ed9.js → index-a726328a.js} +14 -14
- package/assets/{index-fa32959a.js → index-b9d867e8.js} +2 -2
- package/assets/{index-a7da0042.js → index-e1852aa5.js} +1 -1
- package/assets/{native-88be1c15.js → native-75daf8a5.js} +1 -1
- package/assets/{w3m-modal-1eda3798.js → w3m-modal-29bd813f.js} +1 -1
- package/index.html +4 -4
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Q as it,U as rt,s as q,r as w,i as b,x as h,q as ot,m as d,K as p,V as at,d as x,h as Z}from"./core-
|
|
1
|
+
import{Q as it,U as rt,s as q,r as w,i as b,x as h,q as ot,m as d,K as p,V as at,d as x,h as Z}from"./core-31531cbc.js";import{_ as c}from"./index-a726328a.js";const W=".",S={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--apkt-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--apkt-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},formatCurrency(t=0,e={}){const r=Number(t);return isNaN(r)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2,...e}).format(r)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:r,truncate:o}){return t.length<=e+r?t:o==="end"?`${t.substring(0,e)}...`:o==="start"?`...${t.substring(t.length-r)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(r))}`},generateAvatarColors(t){const r=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),o=this.hexToRgb(r),a=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),n=100-3*Number(a==null?void 0:a.replace("px","")),s=`${n}% ${n}% at 65% 40%`,u=[];for(let v=0;v<5;v+=1){const E=this.tintColor(o,.15*v);u.push(`rgb(${E[0]}, ${E[1]}, ${E[2]})`)}return`
|
|
2
2
|
--local-color-1: ${u[0]};
|
|
3
3
|
--local-color-2: ${u[1]};
|
|
4
4
|
--local-color-3: ${u[2]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./index-
|
|
1
|
+
import{b as e}from"./index-a726328a.js";function t(){if(typeof WebSocket<"u")return WebSocket;if(typeof e.WebSocket<"u")return e.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const n=t();export{n as WebSocket};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as b,t as _e,w as Be,l as Te,u as Ue,v as ze,n as f,a as ye,y as Ye,C as he,c as z,S as v,R as p,z as Z,B as J,D as Xe,F as te,b as de,E as M,G as ue,I as pe,M as R,J as Fe,d as A,r as se,i as x,x as l,h as Le,K as me,g as ke,e as qe,L as Y,O as y,s as He,A as le,T as Qe,P as Ze}from"./core-4faee1c5.js";import{c as T,n as h,o as O,r as m,U as je}from"./index-a7da0042.js";import"./index-79609ed9.js";import"./index-fa32959a.js";const j={getGasPriceInEther(e,t){const o=t*e;return Number(o)/1e18},getGasPriceInUSD(e,t,o){const n=j.getGasPriceInEther(t,o);return b.bigNumber(e).times(n).toNumber()},getPriceImpact({sourceTokenAmount:e,sourceTokenPriceInUSD:t,toTokenPriceInUSD:o,toTokenAmount:n}){const a=b.bigNumber(e).times(t),i=b.bigNumber(n).times(o);return a.minus(i).div(a).times(100).toNumber()},getMaxSlippage(e,t){const o=b.bigNumber(e).div(100);return b.multiply(t,o).toNumber()},getProviderFee(e,t=.0085){return b.bigNumber(e).times(t).toString()},isInsufficientNetworkTokenForGas(e,t){const o=t||"0";return b.bigNumber(e).eq(0)?!0:b.bigNumber(b.bigNumber(o)).gt(e)},isInsufficientSourceTokenForSwap(e,t,o){var i,s;const n=(s=(i=o==null?void 0:o.find(c=>c.address===t))==null?void 0:i.quantity)==null?void 0:s.numeric;return b.bigNumber(n||"0").lt(e)}},We=15e4,Je=6,S={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:Te.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},r=_e({...S}),we={state:r,subscribe(e){return Ue(r,()=>e(r))},subscribeKey(e,t){return ze(r,e,t)},getParams(){var d,w,g,P,E,F,L,H,Q;const e=f.state.activeChain,t=((d=f.getAccountData(e))==null?void 0:d.caipAddress)??f.state.activeCaipAddress,o=ye.getPlainAddress(t),n=Ye(),a=he.getConnectorId(f.state.activeChain);if(!o)throw new Error("No address found to swap the tokens from.");const i=!((w=r.toToken)!=null&&w.address)||!((g=r.toToken)!=null&&g.decimals),s=!((P=r.sourceToken)!=null&&P.address)||!((E=r.sourceToken)!=null&&E.decimals)||!b.bigNumber(r.sourceTokenAmount).gt(0),c=!r.sourceTokenAmount;return{networkAddress:n,fromAddress:o,fromCaipAddress:t,sourceTokenAddress:(F=r.sourceToken)==null?void 0:F.address,toTokenAddress:(L=r.toToken)==null?void 0:L.address,toTokenAmount:r.toTokenAmount,toTokenDecimals:(H=r.toToken)==null?void 0:H.decimals,sourceTokenAmount:r.sourceTokenAmount,sourceTokenDecimals:(Q=r.sourceToken)==null?void 0:Q.decimals,invalidToToken:i,invalidSourceToken:s,invalidSourceTokenAmount:c,availableToSwap:t&&!i&&!s&&!c,isAuthConnector:a===z.CONNECTOR_ID.AUTH}},async setSourceToken(e){if(!e){r.sourceToken=e,r.sourceTokenAmount="",r.sourceTokenPriceInUSD=0;return}r.sourceToken=e,await u.setTokenPrice(e.address,"sourceToken")},setSourceTokenAmount(e){r.sourceTokenAmount=e},async setToToken(e){if(!e){r.toToken=e,r.toTokenAmount="",r.toTokenPriceInUSD=0;return}r.toToken=e,await u.setTokenPrice(e.address,"toToken")},setToTokenAmount(e){r.toTokenAmount=e?b.toFixed(e,Je):""},async setTokenPrice(e,t){let o=r.tokensPriceMap[e]||0;o||(r.loadingPrices=!0,o=await u.getAddressPrice(e)),t==="sourceToken"?r.sourceTokenPriceInUSD=o:t==="toToken"&&(r.toTokenPriceInUSD=o),r.loadingPrices&&(r.loadingPrices=!1),u.getParams().availableToSwap&&!r.switchingTokens&&u.swapTokens()},async switchTokens(){if(!(r.initializing||!r.initialized||r.switchingTokens)){r.switchingTokens=!0;try{const e=r.toToken?{...r.toToken}:void 0,t=r.sourceToken?{...r.sourceToken}:void 0,o=e&&r.toTokenAmount===""?"1":r.toTokenAmount;u.setSourceTokenAmount(o),u.setToTokenAmount(""),await u.setSourceToken(e),await u.setToToken(t),r.switchingTokens=!1,u.swapTokens()}catch(e){throw r.switchingTokens=!1,e}}},resetState(){r.myTokensWithBalance=S.myTokensWithBalance,r.tokensPriceMap=S.tokensPriceMap,r.initialized=S.initialized,r.initializing=S.initializing,r.switchingTokens=S.switchingTokens,r.sourceToken=S.sourceToken,r.sourceTokenAmount=S.sourceTokenAmount,r.sourceTokenPriceInUSD=S.sourceTokenPriceInUSD,r.toToken=S.toToken,r.toTokenAmount=S.toTokenAmount,r.toTokenPriceInUSD=S.toTokenPriceInUSD,r.networkPrice=S.networkPrice,r.networkTokenSymbol=S.networkTokenSymbol,r.networkBalanceInUSD=S.networkBalanceInUSD,r.inputError=S.inputError},resetValues(){var o;const{networkAddress:e}=u.getParams(),t=(o=r.tokens)==null?void 0:o.find(n=>n.address===e);u.setSourceToken(t),u.setToToken(void 0)},getApprovalLoadingState(){return r.loadingApprovalTransaction},clearError(){r.transactionError=void 0},async initializeState(){if(!r.initializing){if(r.initializing=!0,!r.initialized)try{await u.fetchTokens(),r.initialized=!0}catch{r.initialized=!1,v.showError("Failed to initialize swap"),p.goBack()}r.initializing=!1}},async fetchTokens(){var o;const{networkAddress:e}=u.getParams();await u.getNetworkTokenPrice(),await u.getMyTokensWithBalance();const t=(o=r.myTokensWithBalance)==null?void 0:o.find(n=>n.address===e);t&&(r.networkTokenSymbol=t.symbol,u.setSourceToken(t),u.setSourceTokenAmount("0"))},async getTokenList(){var t,o;const e=(t=f.state.activeCaipNetwork)==null?void 0:t.caipNetworkId;if(!(r.caipNetworkId===e&&r.tokens))try{r.tokensLoading=!0;const n=await Z.getTokenList(e);r.tokens=n,r.caipNetworkId=e,r.popularTokens=n.sort((d,w)=>d.symbol<w.symbol?-1:d.symbol>w.symbol?1:0);const i=(e&&((o=Te.SUGGESTED_TOKENS_BY_CHAIN)==null?void 0:o[e])||[]).map(d=>n.find(w=>w.symbol===d)).filter(d=>!!d),c=(Te.SWAP_SUGGESTED_TOKENS||[]).map(d=>n.find(w=>w.symbol===d)).filter(d=>!!d).filter(d=>!i.some(w=>w.address===d.address));r.suggestedTokens=[...i,...c]}catch{r.tokens=[],r.popularTokens=[],r.suggestedTokens=[]}finally{r.tokensLoading=!1}},async getAddressPrice(e){var d,w;const t=r.tokensPriceMap[e];if(t)return t;const o=await J.fetchTokenPrice({addresses:[e]}),n=(o==null?void 0:o.fungibles)||[],a=[...r.tokens||[],...r.myTokensWithBalance||[]],i=(d=a==null?void 0:a.find(g=>g.address===e))==null?void 0:d.symbol,s=((w=n.find(g=>g.symbol.toLowerCase()===(i==null?void 0:i.toLowerCase())))==null?void 0:w.price)||0,c=parseFloat(s.toString());return r.tokensPriceMap[e]=c,c},async getNetworkTokenPrice(){var a;const{networkAddress:e}=u.getParams(),o=(a=(await J.fetchTokenPrice({addresses:[e]}).catch(()=>(v.showError("Failed to fetch network token price"),{fungibles:[]}))).fungibles)==null?void 0:a[0],n=(o==null?void 0:o.price.toString())||"0";r.tokensPriceMap[e]=parseFloat(n),r.networkTokenSymbol=(o==null?void 0:o.symbol)||"",r.networkPrice=n},async getMyTokensWithBalance(e){const t=await Xe.getMyTokensWithBalance(e),o=Z.mapBalancesToSwapTokens(t);o&&(await u.getInitialGasPrice(),u.setBalances(o))},setBalances(e){const{networkAddress:t}=u.getParams(),o=f.state.activeCaipNetwork;if(!o)return;const n=e.find(a=>a.address===t);e.forEach(a=>{r.tokensPriceMap[a.address]=a.price||0}),r.myTokensWithBalance=e.filter(a=>a.address.startsWith(o.caipNetworkId)),r.networkBalanceInUSD=n?b.multiply(n.quantity.numeric,n.price).toString():"0"},async getInitialGasPrice(){var t,o;const e=await Z.fetchGasPrice();if(!e)return{gasPrice:null,gasPriceInUSD:null};switch((o=(t=f.state)==null?void 0:t.activeCaipNetwork)==null?void 0:o.chainNamespace){case z.CHAIN.SOLANA:return r.gasFee=e.standard??"0",r.gasPriceInUSD=b.multiply(e.standard,r.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(r.gasFee),gasPriceInUSD:Number(r.gasPriceInUSD)};case z.CHAIN.EVM:default:const n=e.standard??"0",a=BigInt(n),i=BigInt(We),s=j.getGasPriceInUSD(r.networkPrice,i,a);return r.gasFee=n,r.gasPriceInUSD=s,{gasPrice:a,gasPriceInUSD:s}}},async swapTokens(){var i,s,c;const e=(i=f.getAccountData())==null?void 0:i.address,t=r.sourceToken,o=r.toToken,n=b.bigNumber(r.sourceTokenAmount).gt(0);if(n||u.setToTokenAmount(""),!o||!t||r.loadingPrices||!n||!e)return;r.loadingQuote=!0;const a=b.bigNumber(r.sourceTokenAmount).times(10**t.decimals).round(0);try{const d=await J.fetchSwapQuote({userAddress:e,from:t.address,to:o.address,gasPrice:r.gasFee,amount:a.toString()});r.loadingQuote=!1;const w=(c=(s=d==null?void 0:d.quotes)==null?void 0:s[0])==null?void 0:c.toAmount;if(!w){te.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}const g=b.bigNumber(w).div(10**o.decimals).toString();u.setToTokenAmount(g),u.hasInsufficientToken(r.sourceTokenAmount,t.address)?r.inputError="Insufficient balance":(r.inputError=void 0,u.setTransactionDetails())}catch(d){const w=await Z.handleSwapError(d);r.loadingQuote=!1,r.inputError=w||"Insufficient balance"}},async getTransaction(){const{fromCaipAddress:e,availableToSwap:t}=u.getParams(),o=r.sourceToken,n=r.toToken;if(!(!e||!t||!o||!n||r.loadingQuote))try{r.loadingBuildTransaction=!0;const a=await Z.fetchSwapAllowance({userAddress:e,tokenAddress:o.address,sourceTokenAmount:r.sourceTokenAmount,sourceTokenDecimals:o.decimals});let i;return a?i=await u.createSwapTransaction():i=await u.createAllowanceTransaction(),r.loadingBuildTransaction=!1,r.fetchError=!1,i}catch{p.goBack(),v.showError("Failed to check allowance"),r.loadingBuildTransaction=!1,r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:e,sourceTokenAddress:t,toTokenAddress:o}=u.getParams();if(!(!e||!o)){if(!t)throw new Error("createAllowanceTransaction - No source token address found.");try{const n=await J.generateApproveCalldata({from:t,to:o,userAddress:e}),a=ye.getPlainAddress(n.tx.from);if(!a)throw new Error("SwapController:createAllowanceTransaction - address is required");const i={data:n.tx.data,to:a,gasPrice:BigInt(n.tx.eip155.gasPrice),value:BigInt(n.tx.value),toAmount:r.toTokenAmount};return r.swapTransaction=void 0,r.approvalTransaction={data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount},{data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount}}catch{p.goBack(),v.showError("Failed to create approval transaction"),r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}}},async createSwapTransaction(){var s;const{networkAddress:e,fromCaipAddress:t,sourceTokenAmount:o}=u.getParams(),n=r.sourceToken,a=r.toToken;if(!t||!o||!n||!a)return;const i=(s=de.parseUnits(o,n.decimals))==null?void 0:s.toString();try{const c=await J.generateSwapCalldata({userAddress:t,from:n.address,to:a.address,amount:i,disableEstimate:!0}),d=n.address===e,w=BigInt(c.tx.eip155.gas),g=BigInt(c.tx.eip155.gasPrice),P=ye.getPlainAddress(c.tx.to);if(!P)throw new Error("SwapController:createSwapTransaction - address is required");const E={data:c.tx.data,to:P,gas:w,gasPrice:g,value:BigInt(d?i??"0":"0"),toAmount:r.toTokenAmount};return r.gasPriceInUSD=j.getGasPriceInUSD(r.networkPrice,w,g),r.approvalTransaction=void 0,r.swapTransaction=E,E}catch{p.goBack(),v.showError("Failed to create transaction"),r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){v.showLoading("Approve limit increase in your wallet"),p.replace("SwapPreview")},async sendTransactionForApproval(e){var a,i,s;const{fromAddress:t,isAuthConnector:o}=u.getParams();r.loadingApprovalTransaction=!0;const n="Approve limit increase in your wallet";o?p.pushTransactionStack({onSuccess:u.onEmbeddedWalletApprovalSuccess}):v.showLoading(n);try{await de.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:z.CHAIN.EVM}),await u.swapTokens(),await u.getTransaction(),r.approvalTransaction=void 0,r.loadingApprovalTransaction=!1}catch(c){const d=c;r.transactionError=d==null?void 0:d.displayMessage,r.loadingApprovalTransaction=!1,v.showError((d==null?void 0:d.displayMessage)||"Transaction error"),M.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:(d==null?void 0:d.displayMessage)||(d==null?void 0:d.message)||"Unknown",network:((a=f.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)||"",swapFromToken:((i=u.state.sourceToken)==null?void 0:i.symbol)||"",swapToToken:((s=u.state.toToken)==null?void 0:s.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(e){var s,c,d,w,g,P,E,F,L,H,Q,Ee;if(!e)return;const{fromAddress:t,toTokenAmount:o,isAuthConnector:n}=u.getParams();r.loadingTransaction=!0;const a=`Swapping ${(s=r.sourceToken)==null?void 0:s.symbol} to ${b.formatNumberToLocalString(o,3)} ${(c=r.toToken)==null?void 0:c.symbol}`,i=`Swapped ${(d=r.sourceToken)==null?void 0:d.symbol} to ${b.formatNumberToLocalString(o,3)} ${(w=r.toToken)==null?void 0:w.symbol}`;n?p.pushTransactionStack({onSuccess(){p.replace("Account"),v.showLoading(a),we.resetState()}}):v.showLoading("Confirm transaction in your wallet");try{const ve=[(g=r.sourceToken)==null?void 0:g.address,(P=r.toToken)==null?void 0:P.address].join(","),$=await de.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:z.CHAIN.EVM});return r.loadingTransaction=!1,v.showSuccess(i),M.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((E=f.state.activeCaipNetwork)==null?void 0:E.caipNetworkId)||"",swapFromToken:((F=u.state.sourceToken)==null?void 0:F.symbol)||"",swapToToken:((L=u.state.toToken)==null?void 0:L.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}}),we.resetState(),n||p.replace("Account"),we.getMyTokensWithBalance(ve),$}catch(ve){const $=ve;r.transactionError=$==null?void 0:$.displayMessage,r.loadingTransaction=!1,v.showError(($==null?void 0:$.displayMessage)||"Transaction error"),M.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:($==null?void 0:$.displayMessage)||($==null?void 0:$.message)||"Unknown",network:((H=f.state.activeCaipNetwork)==null?void 0:H.caipNetworkId)||"",swapFromToken:((Q=u.state.sourceToken)==null?void 0:Q.symbol)||"",swapToToken:((Ee=u.state.toToken)==null?void 0:Ee.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(e,t){return j.isInsufficientSourceTokenForSwap(e,t,r.myTokensWithBalance)},setTransactionDetails(){const{toTokenAddress:e,toTokenDecimals:t}=u.getParams();!e||!t||(r.gasPriceInUSD=j.getGasPriceInUSD(r.networkPrice,BigInt(r.gasFee),BigInt(We)),r.priceImpact=j.getPriceImpact({sourceTokenAmount:r.sourceTokenAmount,sourceTokenPriceInUSD:r.sourceTokenPriceInUSD,toTokenPriceInUSD:r.toTokenPriceInUSD,toTokenAmount:r.toTokenAmount}),r.maxSlippage=j.getMaxSlippage(r.slippage,r.toTokenAmount),r.providerFee=j.getProviderFee(r.sourceTokenAmount))}},u=Be(we),W=_e({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),et={state:W,subscribe(e){return Ue(W,()=>e(W))},subscribeKey(e,t){return ze(W,e,t)},showTooltip({message:e,triggerRect:t,variant:o}){W.open=!0,W.message=e,W.triggerRect=t,W.variant=o},hide(){W.open=!1,W.message="",W.triggerRect={width:0,height:0,top:0,left:0}}},ee=Be(et),Me={isUnsupportedChainView(){return p.state.view==="UnsupportedChain"||p.state.view==="SwitchNetwork"&&p.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){R.shake();return}if(await Fe.isSIWXCloseDisabled()){R.shake();return}(p.state.view==="DataCapture"||p.state.view==="DataCaptureOtpConfirm")&&de.disconnect(),R.close()}},tt=A`
|
|
1
|
+
import{N as b,t as _e,w as Be,l as Te,u as Ue,v as ze,n as f,a as ye,y as Ye,C as he,c as z,S as v,R as p,z as Z,B as J,D as Xe,F as te,b as de,E as M,G as ue,I as pe,M as R,J as Fe,d as A,r as se,i as x,x as l,h as Le,K as me,g as ke,e as qe,L as Y,O as y,s as He,A as le,T as Qe,P as Ze}from"./core-31531cbc.js";import{c as T,n as h,o as O,r as m,U as je}from"./index-e1852aa5.js";import"./index-a726328a.js";import"./index-b9d867e8.js";const j={getGasPriceInEther(e,t){const o=t*e;return Number(o)/1e18},getGasPriceInUSD(e,t,o){const n=j.getGasPriceInEther(t,o);return b.bigNumber(e).times(n).toNumber()},getPriceImpact({sourceTokenAmount:e,sourceTokenPriceInUSD:t,toTokenPriceInUSD:o,toTokenAmount:n}){const a=b.bigNumber(e).times(t),i=b.bigNumber(n).times(o);return a.minus(i).div(a).times(100).toNumber()},getMaxSlippage(e,t){const o=b.bigNumber(e).div(100);return b.multiply(t,o).toNumber()},getProviderFee(e,t=.0085){return b.bigNumber(e).times(t).toString()},isInsufficientNetworkTokenForGas(e,t){const o=t||"0";return b.bigNumber(e).eq(0)?!0:b.bigNumber(b.bigNumber(o)).gt(e)},isInsufficientSourceTokenForSwap(e,t,o){var i,s;const n=(s=(i=o==null?void 0:o.find(c=>c.address===t))==null?void 0:i.quantity)==null?void 0:s.numeric;return b.bigNumber(n||"0").lt(e)}},We=15e4,Je=6,S={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:Te.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},r=_e({...S}),we={state:r,subscribe(e){return Ue(r,()=>e(r))},subscribeKey(e,t){return ze(r,e,t)},getParams(){var d,w,g,P,E,F,L,H,Q;const e=f.state.activeChain,t=((d=f.getAccountData(e))==null?void 0:d.caipAddress)??f.state.activeCaipAddress,o=ye.getPlainAddress(t),n=Ye(),a=he.getConnectorId(f.state.activeChain);if(!o)throw new Error("No address found to swap the tokens from.");const i=!((w=r.toToken)!=null&&w.address)||!((g=r.toToken)!=null&&g.decimals),s=!((P=r.sourceToken)!=null&&P.address)||!((E=r.sourceToken)!=null&&E.decimals)||!b.bigNumber(r.sourceTokenAmount).gt(0),c=!r.sourceTokenAmount;return{networkAddress:n,fromAddress:o,fromCaipAddress:t,sourceTokenAddress:(F=r.sourceToken)==null?void 0:F.address,toTokenAddress:(L=r.toToken)==null?void 0:L.address,toTokenAmount:r.toTokenAmount,toTokenDecimals:(H=r.toToken)==null?void 0:H.decimals,sourceTokenAmount:r.sourceTokenAmount,sourceTokenDecimals:(Q=r.sourceToken)==null?void 0:Q.decimals,invalidToToken:i,invalidSourceToken:s,invalidSourceTokenAmount:c,availableToSwap:t&&!i&&!s&&!c,isAuthConnector:a===z.CONNECTOR_ID.AUTH}},async setSourceToken(e){if(!e){r.sourceToken=e,r.sourceTokenAmount="",r.sourceTokenPriceInUSD=0;return}r.sourceToken=e,await u.setTokenPrice(e.address,"sourceToken")},setSourceTokenAmount(e){r.sourceTokenAmount=e},async setToToken(e){if(!e){r.toToken=e,r.toTokenAmount="",r.toTokenPriceInUSD=0;return}r.toToken=e,await u.setTokenPrice(e.address,"toToken")},setToTokenAmount(e){r.toTokenAmount=e?b.toFixed(e,Je):""},async setTokenPrice(e,t){let o=r.tokensPriceMap[e]||0;o||(r.loadingPrices=!0,o=await u.getAddressPrice(e)),t==="sourceToken"?r.sourceTokenPriceInUSD=o:t==="toToken"&&(r.toTokenPriceInUSD=o),r.loadingPrices&&(r.loadingPrices=!1),u.getParams().availableToSwap&&!r.switchingTokens&&u.swapTokens()},async switchTokens(){if(!(r.initializing||!r.initialized||r.switchingTokens)){r.switchingTokens=!0;try{const e=r.toToken?{...r.toToken}:void 0,t=r.sourceToken?{...r.sourceToken}:void 0,o=e&&r.toTokenAmount===""?"1":r.toTokenAmount;u.setSourceTokenAmount(o),u.setToTokenAmount(""),await u.setSourceToken(e),await u.setToToken(t),r.switchingTokens=!1,u.swapTokens()}catch(e){throw r.switchingTokens=!1,e}}},resetState(){r.myTokensWithBalance=S.myTokensWithBalance,r.tokensPriceMap=S.tokensPriceMap,r.initialized=S.initialized,r.initializing=S.initializing,r.switchingTokens=S.switchingTokens,r.sourceToken=S.sourceToken,r.sourceTokenAmount=S.sourceTokenAmount,r.sourceTokenPriceInUSD=S.sourceTokenPriceInUSD,r.toToken=S.toToken,r.toTokenAmount=S.toTokenAmount,r.toTokenPriceInUSD=S.toTokenPriceInUSD,r.networkPrice=S.networkPrice,r.networkTokenSymbol=S.networkTokenSymbol,r.networkBalanceInUSD=S.networkBalanceInUSD,r.inputError=S.inputError},resetValues(){var o;const{networkAddress:e}=u.getParams(),t=(o=r.tokens)==null?void 0:o.find(n=>n.address===e);u.setSourceToken(t),u.setToToken(void 0)},getApprovalLoadingState(){return r.loadingApprovalTransaction},clearError(){r.transactionError=void 0},async initializeState(){if(!r.initializing){if(r.initializing=!0,!r.initialized)try{await u.fetchTokens(),r.initialized=!0}catch{r.initialized=!1,v.showError("Failed to initialize swap"),p.goBack()}r.initializing=!1}},async fetchTokens(){var o;const{networkAddress:e}=u.getParams();await u.getNetworkTokenPrice(),await u.getMyTokensWithBalance();const t=(o=r.myTokensWithBalance)==null?void 0:o.find(n=>n.address===e);t&&(r.networkTokenSymbol=t.symbol,u.setSourceToken(t),u.setSourceTokenAmount("0"))},async getTokenList(){var t,o;const e=(t=f.state.activeCaipNetwork)==null?void 0:t.caipNetworkId;if(!(r.caipNetworkId===e&&r.tokens))try{r.tokensLoading=!0;const n=await Z.getTokenList(e);r.tokens=n,r.caipNetworkId=e,r.popularTokens=n.sort((d,w)=>d.symbol<w.symbol?-1:d.symbol>w.symbol?1:0);const i=(e&&((o=Te.SUGGESTED_TOKENS_BY_CHAIN)==null?void 0:o[e])||[]).map(d=>n.find(w=>w.symbol===d)).filter(d=>!!d),c=(Te.SWAP_SUGGESTED_TOKENS||[]).map(d=>n.find(w=>w.symbol===d)).filter(d=>!!d).filter(d=>!i.some(w=>w.address===d.address));r.suggestedTokens=[...i,...c]}catch{r.tokens=[],r.popularTokens=[],r.suggestedTokens=[]}finally{r.tokensLoading=!1}},async getAddressPrice(e){var d,w;const t=r.tokensPriceMap[e];if(t)return t;const o=await J.fetchTokenPrice({addresses:[e]}),n=(o==null?void 0:o.fungibles)||[],a=[...r.tokens||[],...r.myTokensWithBalance||[]],i=(d=a==null?void 0:a.find(g=>g.address===e))==null?void 0:d.symbol,s=((w=n.find(g=>g.symbol.toLowerCase()===(i==null?void 0:i.toLowerCase())))==null?void 0:w.price)||0,c=parseFloat(s.toString());return r.tokensPriceMap[e]=c,c},async getNetworkTokenPrice(){var a;const{networkAddress:e}=u.getParams(),o=(a=(await J.fetchTokenPrice({addresses:[e]}).catch(()=>(v.showError("Failed to fetch network token price"),{fungibles:[]}))).fungibles)==null?void 0:a[0],n=(o==null?void 0:o.price.toString())||"0";r.tokensPriceMap[e]=parseFloat(n),r.networkTokenSymbol=(o==null?void 0:o.symbol)||"",r.networkPrice=n},async getMyTokensWithBalance(e){const t=await Xe.getMyTokensWithBalance(e),o=Z.mapBalancesToSwapTokens(t);o&&(await u.getInitialGasPrice(),u.setBalances(o))},setBalances(e){const{networkAddress:t}=u.getParams(),o=f.state.activeCaipNetwork;if(!o)return;const n=e.find(a=>a.address===t);e.forEach(a=>{r.tokensPriceMap[a.address]=a.price||0}),r.myTokensWithBalance=e.filter(a=>a.address.startsWith(o.caipNetworkId)),r.networkBalanceInUSD=n?b.multiply(n.quantity.numeric,n.price).toString():"0"},async getInitialGasPrice(){var t,o;const e=await Z.fetchGasPrice();if(!e)return{gasPrice:null,gasPriceInUSD:null};switch((o=(t=f.state)==null?void 0:t.activeCaipNetwork)==null?void 0:o.chainNamespace){case z.CHAIN.SOLANA:return r.gasFee=e.standard??"0",r.gasPriceInUSD=b.multiply(e.standard,r.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(r.gasFee),gasPriceInUSD:Number(r.gasPriceInUSD)};case z.CHAIN.EVM:default:const n=e.standard??"0",a=BigInt(n),i=BigInt(We),s=j.getGasPriceInUSD(r.networkPrice,i,a);return r.gasFee=n,r.gasPriceInUSD=s,{gasPrice:a,gasPriceInUSD:s}}},async swapTokens(){var i,s,c;const e=(i=f.getAccountData())==null?void 0:i.address,t=r.sourceToken,o=r.toToken,n=b.bigNumber(r.sourceTokenAmount).gt(0);if(n||u.setToTokenAmount(""),!o||!t||r.loadingPrices||!n||!e)return;r.loadingQuote=!0;const a=b.bigNumber(r.sourceTokenAmount).times(10**t.decimals).round(0);try{const d=await J.fetchSwapQuote({userAddress:e,from:t.address,to:o.address,gasPrice:r.gasFee,amount:a.toString()});r.loadingQuote=!1;const w=(c=(s=d==null?void 0:d.quotes)==null?void 0:s[0])==null?void 0:c.toAmount;if(!w){te.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}const g=b.bigNumber(w).div(10**o.decimals).toString();u.setToTokenAmount(g),u.hasInsufficientToken(r.sourceTokenAmount,t.address)?r.inputError="Insufficient balance":(r.inputError=void 0,u.setTransactionDetails())}catch(d){const w=await Z.handleSwapError(d);r.loadingQuote=!1,r.inputError=w||"Insufficient balance"}},async getTransaction(){const{fromCaipAddress:e,availableToSwap:t}=u.getParams(),o=r.sourceToken,n=r.toToken;if(!(!e||!t||!o||!n||r.loadingQuote))try{r.loadingBuildTransaction=!0;const a=await Z.fetchSwapAllowance({userAddress:e,tokenAddress:o.address,sourceTokenAmount:r.sourceTokenAmount,sourceTokenDecimals:o.decimals});let i;return a?i=await u.createSwapTransaction():i=await u.createAllowanceTransaction(),r.loadingBuildTransaction=!1,r.fetchError=!1,i}catch{p.goBack(),v.showError("Failed to check allowance"),r.loadingBuildTransaction=!1,r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:e,sourceTokenAddress:t,toTokenAddress:o}=u.getParams();if(!(!e||!o)){if(!t)throw new Error("createAllowanceTransaction - No source token address found.");try{const n=await J.generateApproveCalldata({from:t,to:o,userAddress:e}),a=ye.getPlainAddress(n.tx.from);if(!a)throw new Error("SwapController:createAllowanceTransaction - address is required");const i={data:n.tx.data,to:a,gasPrice:BigInt(n.tx.eip155.gasPrice),value:BigInt(n.tx.value),toAmount:r.toTokenAmount};return r.swapTransaction=void 0,r.approvalTransaction={data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount},{data:i.data,to:i.to,gasPrice:i.gasPrice,value:i.value,toAmount:i.toAmount}}catch{p.goBack(),v.showError("Failed to create approval transaction"),r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}}},async createSwapTransaction(){var s;const{networkAddress:e,fromCaipAddress:t,sourceTokenAmount:o}=u.getParams(),n=r.sourceToken,a=r.toToken;if(!t||!o||!n||!a)return;const i=(s=de.parseUnits(o,n.decimals))==null?void 0:s.toString();try{const c=await J.generateSwapCalldata({userAddress:t,from:n.address,to:a.address,amount:i,disableEstimate:!0}),d=n.address===e,w=BigInt(c.tx.eip155.gas),g=BigInt(c.tx.eip155.gasPrice),P=ye.getPlainAddress(c.tx.to);if(!P)throw new Error("SwapController:createSwapTransaction - address is required");const E={data:c.tx.data,to:P,gas:w,gasPrice:g,value:BigInt(d?i??"0":"0"),toAmount:r.toTokenAmount};return r.gasPriceInUSD=j.getGasPriceInUSD(r.networkPrice,w,g),r.approvalTransaction=void 0,r.swapTransaction=E,E}catch{p.goBack(),v.showError("Failed to create transaction"),r.approvalTransaction=void 0,r.swapTransaction=void 0,r.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){v.showLoading("Approve limit increase in your wallet"),p.replace("SwapPreview")},async sendTransactionForApproval(e){var a,i,s;const{fromAddress:t,isAuthConnector:o}=u.getParams();r.loadingApprovalTransaction=!0;const n="Approve limit increase in your wallet";o?p.pushTransactionStack({onSuccess:u.onEmbeddedWalletApprovalSuccess}):v.showLoading(n);try{await de.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:z.CHAIN.EVM}),await u.swapTokens(),await u.getTransaction(),r.approvalTransaction=void 0,r.loadingApprovalTransaction=!1}catch(c){const d=c;r.transactionError=d==null?void 0:d.displayMessage,r.loadingApprovalTransaction=!1,v.showError((d==null?void 0:d.displayMessage)||"Transaction error"),M.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:(d==null?void 0:d.displayMessage)||(d==null?void 0:d.message)||"Unknown",network:((a=f.state.activeCaipNetwork)==null?void 0:a.caipNetworkId)||"",swapFromToken:((i=u.state.sourceToken)==null?void 0:i.symbol)||"",swapToToken:((s=u.state.toToken)==null?void 0:s.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(e){var s,c,d,w,g,P,E,F,L,H,Q,Ee;if(!e)return;const{fromAddress:t,toTokenAmount:o,isAuthConnector:n}=u.getParams();r.loadingTransaction=!0;const a=`Swapping ${(s=r.sourceToken)==null?void 0:s.symbol} to ${b.formatNumberToLocalString(o,3)} ${(c=r.toToken)==null?void 0:c.symbol}`,i=`Swapped ${(d=r.sourceToken)==null?void 0:d.symbol} to ${b.formatNumberToLocalString(o,3)} ${(w=r.toToken)==null?void 0:w.symbol}`;n?p.pushTransactionStack({onSuccess(){p.replace("Account"),v.showLoading(a),we.resetState()}}):v.showLoading("Confirm transaction in your wallet");try{const ve=[(g=r.sourceToken)==null?void 0:g.address,(P=r.toToken)==null?void 0:P.address].join(","),$=await de.sendTransaction({address:t,to:e.to,data:e.data,value:e.value,chainNamespace:z.CHAIN.EVM});return r.loadingTransaction=!1,v.showSuccess(i),M.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((E=f.state.activeCaipNetwork)==null?void 0:E.caipNetworkId)||"",swapFromToken:((F=u.state.sourceToken)==null?void 0:F.symbol)||"",swapToToken:((L=u.state.toToken)==null?void 0:L.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}}),we.resetState(),n||p.replace("Account"),we.getMyTokensWithBalance(ve),$}catch(ve){const $=ve;r.transactionError=$==null?void 0:$.displayMessage,r.loadingTransaction=!1,v.showError(($==null?void 0:$.displayMessage)||"Transaction error"),M.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:($==null?void 0:$.displayMessage)||($==null?void 0:$.message)||"Unknown",network:((H=f.state.activeCaipNetwork)==null?void 0:H.caipNetworkId)||"",swapFromToken:((Q=u.state.sourceToken)==null?void 0:Q.symbol)||"",swapToToken:((Ee=u.state.toToken)==null?void 0:Ee.symbol)||"",swapFromAmount:u.state.sourceTokenAmount||"",swapToAmount:u.state.toTokenAmount||"",isSmartAccount:ue(z.CHAIN.EVM)===pe.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(e,t){return j.isInsufficientSourceTokenForSwap(e,t,r.myTokensWithBalance)},setTransactionDetails(){const{toTokenAddress:e,toTokenDecimals:t}=u.getParams();!e||!t||(r.gasPriceInUSD=j.getGasPriceInUSD(r.networkPrice,BigInt(r.gasFee),BigInt(We)),r.priceImpact=j.getPriceImpact({sourceTokenAmount:r.sourceTokenAmount,sourceTokenPriceInUSD:r.sourceTokenPriceInUSD,toTokenPriceInUSD:r.toTokenPriceInUSD,toTokenAmount:r.toTokenAmount}),r.maxSlippage=j.getMaxSlippage(r.slippage,r.toTokenAmount),r.providerFee=j.getProviderFee(r.sourceTokenAmount))}},u=Be(we),W=_e({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),et={state:W,subscribe(e){return Ue(W,()=>e(W))},subscribeKey(e,t){return ze(W,e,t)},showTooltip({message:e,triggerRect:t,variant:o}){W.open=!0,W.message=e,W.triggerRect=t,W.variant=o},hide(){W.open=!1,W.message="",W.triggerRect={width:0,height:0,top:0,left:0}}},ee=Be(et),Me={isUnsupportedChainView(){return p.state.view==="UnsupportedChain"||p.state.view==="SwitchNetwork"&&p.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){R.shake();return}if(await Fe.isSIWXCloseDisabled()){R.shake();return}(p.state.view==="DataCapture"||p.state.view==="DataCaptureOtpConfirm")&&de.disconnect(),R.close()}},tt=A`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: clamp(0px, ${({borderRadius:e})=>e[8]}, 44px);
|
package/index.html
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<meta name="theme-color" content="#000000" />
|
|
7
7
|
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400" rel="stylesheet" />
|
|
8
8
|
<script defer src="https://use.fontawesome.com/releases/v5.0.1/js/all.js"></script>
|
|
9
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.
|
|
10
|
-
<link rel="shortcut icon" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.
|
|
9
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.1-27021055025.commit-110ffa1/manifest.json" />
|
|
10
|
+
<link rel="shortcut icon" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.1-27021055025.commit-110ffa1/favicon.ico" />
|
|
11
11
|
<title>Decentraland's Vesting Dashboard</title>
|
|
12
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.
|
|
13
|
-
<link rel="stylesheet" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.
|
|
12
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.1-27021055025.commit-110ffa1/assets/index-a726328a.js"></script>
|
|
13
|
+
<link rel="stylesheet" href="https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.1-27021055025.commit-110ffa1/assets/index-4c6a0cc5.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/vesting-dashboard",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1-27021055025.commit-110ffa1",
|
|
4
4
|
"description": "Static website for the vesting dashboard",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/decentraland/vesting-dashboard.git"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.
|
|
21
|
-
"commit": "
|
|
20
|
+
"homepage": "https://cdn.decentraland.org/@dcl/vesting-dashboard/3.8.1-27021055025.commit-110ffa1",
|
|
21
|
+
"commit": "110ffa157b306bbe4a05c842cdaa0f855b28d29d"
|
|
22
22
|
}
|