@dcl/auth-site 4.11.9 → 4.11.10-22676266766.commit-1271d91
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/1949206f0b8ec64d-qrlN31md.svg +9 -0
- package/assets/805322223c96be40-CKnEN-kZ.png +0 -0
- package/assets/{ConstantsUtil-BAOMwrjB.js → ConstantsUtil-Dvbyo3xl.js} +1 -1
- package/assets/{ContentfulRichText-BVJInl_X.js → ContentfulRichText-Chxmb5VK.js} +1 -1
- package/assets/{ExchangeController-CE1-qDFM.js → ExchangeController-BIWQ6RxR.js} +1 -1
- package/assets/{HelpersUtil-p_2TOprz.js → HelpersUtil-BipmgXxV.js} +1 -1
- package/assets/NetworkUtil-Cu9fmn-V.js +7 -0
- package/assets/{SwapController-BmfRgnRE.js → SwapController-BaN09kVz.js} +1 -1
- package/assets/{biconomy-ZuBpxB_Z.js → biconomy-DmMbyOgs.js} +1 -1
- package/assets/brand-icons-Cu_C0hZ4.svg +1008 -0
- package/assets/brand-icons-F3SPCeH1.woff +0 -0
- package/assets/brand-icons-XL9sxUpA.woff2 +0 -0
- package/assets/brand-icons-sqJ2Pg7a.eot +0 -0
- package/assets/brand-icons-ubhWoxly.ttf +0 -0
- package/assets/ccip-DTI6wHGx.js +1 -0
- package/assets/da0e2040ea4c51ef-rAUxngFb.svg +1 -0
- package/assets/{data-capture-DXFbD_2X.js → data-capture-DLNaUFp-.js} +3 -3
- package/assets/{email-CZZgeDwu.js → email-bVf_8YtI.js} +6 -6
- package/assets/{embedded-wallet-DhhuHH_S.js → embedded-wallet-3Xlwi4qO.js} +6 -6
- package/assets/{engine-ML4Qg8j7.js → engine-BaOJFCH0.js} +1 -1
- package/assets/extractIPFS-BVAza8RN.js +1 -0
- package/assets/{features-oA675acZ.js → features-CNEAftb-.js} +2 -2
- package/assets/flags-DOLqOU7Y.png +0 -0
- package/assets/fortmatic-8AYCoAUC.js +13 -0
- package/assets/{getInstalledModules-u4tfyC0o.js → getInstalledModules-DAbxuhX-.js} +1 -1
- package/assets/icons-BOCtAERH.woff +0 -0
- package/assets/icons-CHzK1VD9.eot +0 -0
- package/assets/icons-D29ZQHHw.ttf +0 -0
- package/assets/icons-Du6TOHnR.woff2 +0 -0
- package/assets/icons-RwhydX30.svg +1518 -0
- package/assets/{if-defined-DEgQ1z7T.js → if-defined-B86bHg5H.js} +1 -1
- package/assets/image1-_0ffTiKd.webp +0 -0
- package/assets/image10-I4vX--po.webp +0 -0
- package/assets/image2-sHeDDy_F.webp +0 -0
- package/assets/image3-B79JnaG7.webp +0 -0
- package/assets/image4-Cy2Bg8G8.webp +0 -0
- package/assets/image5-BwZ-6sYY.webp +0 -0
- package/assets/image6-DFi5BRnf.webp +0 -0
- package/assets/image7-CyRqcJTw.webp +0 -0
- package/assets/image8-DohHwcO9.webp +0 -0
- package/assets/image9-caIPOcpa.webp +0 -0
- package/assets/in-app-wallet-calls-DUG7H8lh.js +1 -0
- package/assets/{index-BjSGFaos.js → index-AGf9l8z4.js} +1 -1
- package/assets/{index-B-NFA50q.js → index-B4BHG5YK.js} +1 -1
- package/assets/index-B68pVKjO.js +1 -0
- package/assets/{index-BYIDeuBS.js → index-B6sW1w2F.js} +1 -1
- package/assets/index-B7gs66V9.css +1 -0
- package/assets/index-BMzIV9uv.js +20858 -0
- package/assets/{index-SRfS2tv8.js → index-BSag5MQb.js} +1 -1
- package/assets/{index-BlSibOdP.js → index-BWOolRoL.js} +1 -1
- package/assets/index-BZ5gnlzQ.js +248 -0
- package/assets/{index-Ctooc5wh.js → index-Ba7CrbE5.js} +1 -1
- package/assets/{index-CN9hvq_d.js → index-BqPFw2K3.js} +1 -1
- package/assets/{index-9g7rK-S6.js → index-Bt7GysL7.js} +3 -3
- package/assets/index-C2O1ber7.js +2 -0
- package/assets/index-CBVJJEjl.js +14 -0
- package/assets/index-CEiHSD_P.js +7 -0
- package/assets/{index-DCbuXsQl.js → index-CI-i_T_Z.js} +1 -1
- package/assets/{index-CnUxTVea.js → index-CIRR8nnu.js} +4 -4
- package/assets/{index-B2ekOHvY.js → index-CLzxzsYd.js} +1 -1
- package/assets/index-CQStrCFF.js +13 -0
- package/assets/{index-C5PmOkdY.js → index-CdEiBdPm.js} +4 -4
- package/assets/{index-DmnoYEjg.js → index-CgZ7dz6W.js} +4 -4
- package/assets/{index-NeSzI640.js → index-Ci9xd11V.js} +1 -1
- package/assets/{index-CHQeOazc.js → index-CnRYErVx.js} +4 -4
- package/assets/{index-BlHvjgXX.js → index-CqvtnHRM.js} +1 -1
- package/assets/{index-BvpsDGXr.js → index-Cx_oCKkO.js} +3 -3
- package/assets/{index-BXROPBR7.js → index-D5HGKMW0.js} +1 -1
- package/assets/{index-CQfPnCB_.js → index-DU5mtLd1.js} +1 -1
- package/assets/{index-J7JPwLFu.js → index-DcY7FSH7.js} +3 -3
- package/assets/{index-Bh39Rbc1.js → index-Dq2Y3A7J.js} +1 -1
- package/assets/{index-DiQ5FwKy.js → index-Dq_YwFVb.js} +1 -1
- package/assets/{index-DNU17x7j.js → index-Dy4DXQQP.js} +3 -3
- package/assets/index-Eo4f9NAU.js +3 -0
- package/assets/{index-BkcXrz6w.js → index-OGqrnVZ6.js} +1 -1
- package/assets/{index-DNjjhYA1.js → index-S3wjAGqT.js} +1 -1
- package/assets/index-SbwIQcRK.js +425 -0
- package/assets/{index-CDnwRYv4.js → index-VLVUxQ-H.js} +1 -1
- package/assets/{index-WSsT16vn.js → index-W6F_Eh-4.js} +1 -1
- package/assets/index-XmyXeYxr.js +4 -0
- package/assets/{index-BQep68a1.js → index-bdvnHice.js} +3 -3
- package/assets/{index-BWB9yu1D.js → index-oxCQrPLS.js} +2 -2
- package/assets/{index-IqSw10Sq.js → index-plGxIRIg.js} +1 -1
- package/assets/networks-CWRsKXNZ.js +4 -0
- package/assets/{onramp-B98BEEIV.js → onramp-Bghev6EZ.js} +1 -1
- package/assets/{openzeppelin-C09JYzFS.js → openzeppelin-DzBaLtdZ.js} +1 -1
- package/assets/outline-icons-BfdLr8tr.svg +366 -0
- package/assets/outline-icons-DD8jm0uy.ttf +0 -0
- package/assets/outline-icons-DInHoiqI.woff2 +0 -0
- package/assets/outline-icons-LX8adJ4n.eot +0 -0
- package/assets/outline-icons-aQ88nltS.woff +0 -0
- package/assets/{parse-typed-data-Dy_RpQ65.js → parse-typed-data-BHOkxJgZ.js} +1 -1
- package/assets/passkeys-DLq6jAM1.js +1 -0
- package/assets/{pay-with-exchange-BGiQrnrX.js → pay-with-exchange-irB9Dvhl.js} +3 -3
- package/assets/{receive-Di7H3bRQ.js → receive-BmycT43F.js} +3 -3
- package/assets/{ref-Cs6aE0Nw.js → ref-BmzgZKYC.js} +1 -1
- package/assets/{resolveImplementation-BfuFbByz.js → resolveImplementation-FLUN2QM8.js} +1 -1
- package/assets/secp256k1-C0psEYJS.js +1 -0
- package/assets/{send-DGqbyS5L.js → send-DlJVf4iQ.js} +4 -4
- package/assets/send-eip712-transaction-lfdbYUH7.js +1 -0
- package/assets/{send-gasless-transaction-DuSgxy0D.js → send-gasless-transaction-2rh0cELP.js} +2 -2
- package/assets/{socials-BUpY92PE.js → socials-DnmCuW0Q.js} +8 -8
- package/assets/{swaps-CwZrlZRn.js → swaps-u3Q2d8wx.js} +1 -1
- package/assets/thirdweb-BSAiHs-1.js +20 -0
- package/assets/{transactions-VHmPOc8T.js → transactions-CsJTnhei.js} +2 -2
- package/assets/ui-DqNSiR1k.js +745 -0
- package/assets/ui-v1fesllZ.css +346 -0
- package/assets/vendor-D2ZXGL2v.js +59 -0
- package/assets/verifyHash-C7tK3gcR.js +35 -0
- package/assets/{w3m-modal-Daox802n.js → w3m-modal-ozPSjF-v.js} +1 -1
- package/assets/web-connector-BOqjEs15.js +9 -0
- package/index.html +6 -5
- package/package.json +7 -7
- package/assets/NetworkUtil-ALrBtqvF.js +0 -1
- package/assets/ccip-zer9BVQd.js +0 -1
- package/assets/extractIPFS-6rL7YbLD.js +0 -1
- package/assets/fortmatic-D9QgSvQy.js +0 -13
- package/assets/in-app-wallet-calls-3yC4gf2W.js +0 -1
- package/assets/index-1Iyc_zW4.js +0 -1
- package/assets/index-BIJ1HLK-.js +0 -1
- package/assets/index-BIOPw-dr.css +0 -1
- package/assets/index-BeesMvem.js +0 -13
- package/assets/index-CJclPiJ6.js +0 -425
- package/assets/index-CKuTxBMO.js +0 -5
- package/assets/index-D-htLeKo.js +0 -248
- package/assets/index-DUab044w.js +0 -14
- package/assets/index-DUps-fXR.js +0 -20895
- package/assets/index-De3fN9bR.js +0 -4
- package/assets/index-DiDUF14O.js +0 -21
- package/assets/index-WrFUPUVy.js +0 -1
- package/assets/index-d8qb3Bh1.js +0 -2
- package/assets/networks-4rOVWxZC.js +0 -3
- package/assets/passkeys-CNW9UJaY.js +0 -1
- package/assets/secp256k1-DTiizT7F.js +0 -1
- package/assets/send-eip712-transaction-QgwzVlIl.js +0 -1
- package/assets/successAnimation_Lottie-BpyTLLuX.js +0 -1
- package/assets/thirdweb-3rz-wQc6.js +0 -20
- package/assets/ui-BRI7cdA1.js +0 -741
- package/assets/vendor-BlWFaBbX.js +0 -59
- package/assets/web-connector-BzT9ZilO.js +0 -9
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import{j as A,l as O,m as c,r as B,C as R,a4 as m,a as j,R as Y,O as G,E as V,q as W,W as H}from"./index-BZ5gnlzQ.js";import{U as q,n as d,r as T,c as _}from"./index-oxCQrPLS.js";import{g as N}from"./thirdweb-BSAiHs-1.js";import{r as K,a as J,b as Q}from"./ui-DqNSiR1k.js";import"./index-B6sW1w2F.js";import"./index-plGxIRIg.js";import{o as X}from"./if-defined-B86bHg5H.js";import"./index-VLVUxQ-H.js";import"./index-CI-i_T_Z.js";var Z=K();const I=N(Z);var ee=J();const te=N(ee);var ie=Q();const re=N(ie);var S={exports:{}},ne=S.exports,M;function oe(){return M||(M=1,(function(e,t){(function(i,r){e.exports=r()})(ne,(function(){return function(i,r,o){o.updateLocale=function(n,a){var s=o.Ls[n];if(s)return(a?Object.keys(a):[]).forEach((function(l){s[l]=a[l]})),s}}}))})(S)),S.exports}var ae=oe();const se=N(ae);I.extend(re);I.extend(se);const le={...te,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},ce=["January","February","March","April","May","June","July","August","September","October","November","December"];I.locale("en-web3-modal",le);const z={getMonthNameByIndex(e){return ce[e]},getYear(e=new Date().toISOString()){return I(e).year()},getRelativeDateFromNow(e){return I(e).locale("en-web3-modal").fromNow(!0)},formatDate(e,t="DD MMM"){return I(e).format(t)}},ue=3,F=.1,de=["receive","deposit","borrow","claim"],pe=["withdraw","repay","burn"],$={getTransactionGroupTitle(e,t){const i=z.getYear(),r=z.getMonthNameByIndex(t);return e===i?r:`${r} ${e}`},getTransactionImages(e){const[t]=e;return(e==null?void 0:e.length)>1?e.map(r=>this.getTransactionImage(r)):[this.getTransactionImage(t)]},getTransactionImage(e){return{type:$.getTransactionTransferTokenType(e),url:$.getTransactionImageURL(e)}},getTransactionImageURL(e){var o,n,a,s,l;let t;const i=!!(e!=null&&e.nft_info),r=!!(e!=null&&e.fungible_info);return e&&i?t=(a=(n=(o=e==null?void 0:e.nft_info)==null?void 0:o.content)==null?void 0:n.preview)==null?void 0:a.url:e&&r&&(t=(l=(s=e==null?void 0:e.fungible_info)==null?void 0:s.icon)==null?void 0:l.url),t},getTransactionTransferTokenType(e){if(e!=null&&e.fungible_info)return"FUNGIBLE";if(e!=null&&e.nft_info)return"NFT"},getTransactionDescriptions(e,t){var k;const i=(k=e==null?void 0:e.metadata)==null?void 0:k.operationType,r=t||(e==null?void 0:e.transfers),o=r&&r.length>0,n=r&&r.length>1,a=o&&r.every(v=>!!(v!=null&&v.fungible_info)),[s,l]=r||[];let u=this.getTransferDescription(s),p=this.getTransferDescription(l);if(!o)return(i==="send"||i==="receive")&&a?(u=q.getTruncateString({string:e==null?void 0:e.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),p=q.getTruncateString({string:e==null?void 0:e.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[u,p]):[e.metadata.status];if(n)return r==null?void 0:r.map(v=>this.getTransferDescription(v));let D="";return de.includes(i)?D="+":pe.includes(i)&&(D="-"),u=D.concat(u),[u]},getTransferDescription(e){var i;let t="";return e&&(e!=null&&e.nft_info?t=((i=e==null?void 0:e.nft_info)==null?void 0:i.name)||"-":e!=null&&e.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){var r;return e?[this.getQuantityFixedValue(e==null?void 0:e.quantity.numeric),(r=e==null?void 0:e.fungible_info)==null?void 0:r.symbol].join(" ").trim():null},mergeTransfers(e){if((e==null?void 0:e.length)<=1)return e;const i=this.filterGasFeeTransfers(e).reduce((o,n)=>{var l;const a=(l=n==null?void 0:n.fungible_info)==null?void 0:l.name,s=o.find(({fungible_info:u,direction:p})=>a&&a===(u==null?void 0:u.name)&&p===n.direction);if(s){const u=Number(s.quantity.numeric)+Number(n.quantity.numeric);s.quantity.numeric=u.toString(),s.value=(s.value||0)+(n.value||0)}else o.push(n);return o},[]);let r=i;return i.length>2&&(r=i.sort((o,n)=>(n.value||0)-(o.value||0)).slice(0,2)),r=r.sort((o,n)=>o.direction==="out"&&n.direction==="in"?-1:o.direction==="in"&&n.direction==="out"?1:0),r},filterGasFeeTransfers(e){const t=e==null?void 0:e.reduce((r,o)=>{var a;const n=(a=o==null?void 0:o.fungible_info)==null?void 0:a.name;return n&&(r[n]||(r[n]=[]),r[n].push(o)),r},{}),i=[];return Object.values(t??{}).forEach(r=>{if(r.length===1){const o=r[0];o&&i.push(o)}else{const o=r.filter(a=>a.direction==="in"),n=r.filter(a=>a.direction==="out");if(o.length===1&&n.length===1){const a=o[0],s=n[0];let l=!1;if(a&&s){const u=Number(a.quantity.numeric),p=Number(s.quantity.numeric);p<u*F?(i.push(a),l=!0):u<p*F&&(i.push(s),l=!0)}l||i.push(...r)}else{const a=this.filterGasFeesFromTokenGroup(r);i.push(...a)}}}),e==null||e.forEach(r=>{var o;(o=r==null?void 0:r.fungible_info)!=null&&o.name||i.push(r)}),i},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;const t=e==null?void 0:e.map(s=>Number(s.quantity.numeric)),i=Math.max(...t),r=Math.min(...t),o=.01;if(r<i*o)return e==null?void 0:e.filter(l=>Number(l.quantity.numeric)>=i*o);const n=e==null?void 0:e.filter(s=>s.direction==="in"),a=e==null?void 0:e.filter(s=>s.direction==="out");if(n.length===1&&a.length===1){const s=n[0],l=a[0];if(s&&l){const u=Number(s.quantity.numeric),p=Number(l.quantity.numeric);if(p<u*F)return[s];if(u<p*F)return[l]}}return e},getQuantityFixedValue(e){return e?parseFloat(e).toFixed(ue):null}};var E;(function(e){e.approve="approved",e.bought="bought",e.borrow="borrowed",e.burn="burnt",e.cancel="canceled",e.claim="claimed",e.deploy="deployed",e.deposit="deposited",e.execute="executed",e.mint="minted",e.receive="received",e.repay="repaid",e.send="sent",e.sell="sold",e.stake="staked",e.trade="swapped",e.unstake="unstaked",e.withdraw="withdrawn"})(E||(E={}));const me=A`
|
|
2
|
+
:host > wui-flex {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
position: relative;
|
|
7
|
+
width: 40px;
|
|
8
|
+
height: 40px;
|
|
9
|
+
box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010};
|
|
10
|
+
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([data-no-images='true']) > wui-flex {
|
|
14
|
+
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
15
|
+
border-radius: ${({borderRadius:e})=>e[3]} !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host > wui-flex wui-image {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host > wui-flex,
|
|
23
|
+
:host > wui-flex wui-image,
|
|
24
|
+
.swap-images-container,
|
|
25
|
+
.swap-images-container.nft,
|
|
26
|
+
wui-image.nft {
|
|
27
|
+
border-top-left-radius: var(--local-left-border-radius);
|
|
28
|
+
border-top-right-radius: var(--local-right-border-radius);
|
|
29
|
+
border-bottom-left-radius: var(--local-left-border-radius);
|
|
30
|
+
border-bottom-right-radius: var(--local-right-border-radius);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.swap-images-container {
|
|
34
|
+
position: relative;
|
|
35
|
+
width: 40px;
|
|
36
|
+
height: 40px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.swap-images-container wui-image:first-child {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 40px;
|
|
43
|
+
height: 40px;
|
|
44
|
+
top: 0;
|
|
45
|
+
left: 0%;
|
|
46
|
+
clip-path: inset(0px calc(50% + 2px) 0px 0%);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.swap-images-container wui-image:last-child {
|
|
50
|
+
clip-path: inset(0px 0px 0px calc(50% + 2px));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.swap-fallback-container {
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 0;
|
|
56
|
+
width: 40px;
|
|
57
|
+
height: 40px;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.swap-fallback-container.first {
|
|
64
|
+
clip-path: inset(0px calc(50% + 2px) 0px 0%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.swap-fallback-container.last {
|
|
68
|
+
clip-path: inset(0px 0px 0px calc(50% + 2px));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
wui-flex.status-box {
|
|
72
|
+
position: absolute;
|
|
73
|
+
right: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
transform: translate(20%, 20%);
|
|
76
|
+
border-radius: ${({borderRadius:e})=>e[4]};
|
|
77
|
+
background-color: ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
78
|
+
box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
width: 16px;
|
|
81
|
+
height: 16px;
|
|
82
|
+
}
|
|
83
|
+
`;var w=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let h=class extends O{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""},this.failedImageUrls=new Set}handleImageError(t){return i=>{i.stopPropagation(),this.failedImageUrls.add(t),this.requestUpdate()}}render(){const[t,i]=this.images;this.images.length||(this.dataset.noImages="true");const r=(t==null?void 0:t.type)==="NFT",o=i!=null&&i.url?i.type==="NFT":r,n=r?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)",a=o?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)";return this.style.cssText=`
|
|
84
|
+
--local-left-border-radius: ${n};
|
|
85
|
+
--local-right-border-radius: ${a};
|
|
86
|
+
`,c`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){const[t,i]=this.images;return this.images.length===2&&(t!=null&&t.url||i!=null&&i.url)?this.renderSwapImages(t,i):t!=null&&t.url&&!this.failedImageUrls.has(t.url)?this.renderSingleImage(t):(t==null?void 0:t.type)==="NFT"?this.renderPlaceholderIcon("nftPlaceholder"):this.renderPlaceholderIcon("coinPlaceholder")}renderSwapImages(t,i){return c`<div class="swap-images-container">
|
|
87
|
+
${t!=null&&t.url?this.renderImageOrFallback(t,"first",!0):null}
|
|
88
|
+
${i!=null&&i.url?this.renderImageOrFallback(i,"last",!0):null}
|
|
89
|
+
</div>`}renderSingleImage(t){return this.renderImageOrFallback(t,void 0,!1)}renderImageOrFallback(t,i,r=!1){return t.url?this.failedImageUrls.has(t.url)?r&&i?this.renderFallbackIconInContainer(i):this.renderFallbackIcon():c`<wui-image
|
|
90
|
+
src=${t.url}
|
|
91
|
+
alt="Transaction image"
|
|
92
|
+
@onLoadError=${this.handleImageError(t.url)}
|
|
93
|
+
></wui-image>`:null}renderFallbackIconInContainer(t){return c`<div class="swap-fallback-container ${t}">${this.renderFallbackIcon()}</div>`}renderFallbackIcon(){return c`<wui-icon
|
|
94
|
+
size="xl"
|
|
95
|
+
weight="regular"
|
|
96
|
+
color="default"
|
|
97
|
+
name="networkPlaceholder"
|
|
98
|
+
></wui-icon>`}renderPlaceholderIcon(t){return c`<wui-icon size="xl" weight="regular" color="default" name=${t}></wui-icon>`}templateIcon(){let t="accent-primary",i;return i=this.getIcon(),this.status&&(t=this.getStatusColor()),i?c`
|
|
99
|
+
<wui-flex alignItems="center" justifyContent="center" class="status-box">
|
|
100
|
+
<wui-icon-box size="sm" color=${t} icon=${i}></wui-icon-box>
|
|
101
|
+
</wui-flex>
|
|
102
|
+
`:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontal":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success";case"failed":return"error";case"pending":return"inverse";default:return"accent-primary"}}};h.styles=[me];w([d()],h.prototype,"type",void 0);w([d()],h.prototype,"status",void 0);w([d()],h.prototype,"direction",void 0);w([d({type:Boolean})],h.prototype,"onlyDirectionIcon",void 0);w([d({type:Array})],h.prototype,"images",void 0);w([d({type:Object})],h.prototype,"secondImage",void 0);w([T()],h.prototype,"failedImageUrls",void 0);h=w([_("wui-transaction-visual")],h);const he=A`
|
|
103
|
+
:host {
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:host > wui-flex:first-child {
|
|
108
|
+
align-items: center;
|
|
109
|
+
column-gap: ${({spacing:e})=>e[2]};
|
|
110
|
+
padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]};
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host > wui-flex:first-child wui-text:nth-child(1) {
|
|
115
|
+
text-transform: capitalize;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
wui-transaction-visual {
|
|
119
|
+
width: 40px;
|
|
120
|
+
height: 40px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
wui-flex {
|
|
124
|
+
flex: 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:host wui-flex wui-flex {
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:host .description-container wui-text span {
|
|
132
|
+
word-break: break-all;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host .description-container wui-text {
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host .description-separator-icon {
|
|
140
|
+
margin: 0px 6px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:host wui-text > span {
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
display: -webkit-box;
|
|
146
|
+
-webkit-box-orient: vertical;
|
|
147
|
+
-webkit-line-clamp: 1;
|
|
148
|
+
}
|
|
149
|
+
`;var x=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let g=class extends O{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return c`
|
|
150
|
+
<wui-flex>
|
|
151
|
+
<wui-transaction-visual
|
|
152
|
+
.status=${this.status}
|
|
153
|
+
direction=${X(this.direction)}
|
|
154
|
+
type=${this.type}
|
|
155
|
+
.onlyDirectionIcon=${this.onlyDirectionIcon}
|
|
156
|
+
.images=${this.images}
|
|
157
|
+
></wui-transaction-visual>
|
|
158
|
+
<wui-flex flexDirection="column" gap="1">
|
|
159
|
+
<wui-text variant="lg-medium" color="primary">
|
|
160
|
+
${E[this.type]||this.type}
|
|
161
|
+
</wui-text>
|
|
162
|
+
<wui-flex class="description-container">
|
|
163
|
+
${this.templateDescription()} ${this.templateSecondDescription()}
|
|
164
|
+
</wui-flex>
|
|
165
|
+
</wui-flex>
|
|
166
|
+
<wui-text variant="sm-medium" color="secondary"><span>${this.date}</span></wui-text>
|
|
167
|
+
</wui-flex>
|
|
168
|
+
`}templateDescription(){var i;const t=(i=this.descriptions)==null?void 0:i[0];return t?c`
|
|
169
|
+
<wui-text variant="md-regular" color="secondary">
|
|
170
|
+
<span>${t}</span>
|
|
171
|
+
</wui-text>
|
|
172
|
+
`:null}templateSecondDescription(){var i;const t=(i=this.descriptions)==null?void 0:i[1];return t?c`
|
|
173
|
+
<wui-icon class="description-separator-icon" size="sm" name="arrowRight"></wui-icon>
|
|
174
|
+
<wui-text variant="md-regular" color="secondary">
|
|
175
|
+
<span>${t}</span>
|
|
176
|
+
</wui-text>
|
|
177
|
+
`:null}};g.styles=[B,he];x([d()],g.prototype,"type",void 0);x([d({type:Array})],g.prototype,"descriptions",void 0);x([d()],g.prototype,"date",void 0);x([d({type:Boolean})],g.prototype,"onlyDirectionIcon",void 0);x([d()],g.prototype,"status",void 0);x([d()],g.prototype,"direction",void 0);x([d({type:Array})],g.prototype,"images",void 0);g=x([_("wui-transaction-list-item")],g);const ge=A`
|
|
178
|
+
wui-flex {
|
|
179
|
+
position: relative;
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
justify-content: center;
|
|
182
|
+
align-items: center;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
wui-image {
|
|
186
|
+
border-radius: ${({borderRadius:e})=>e[128]};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.fallback-icon {
|
|
190
|
+
color: ${({tokens:e})=>e.theme.iconInverse};
|
|
191
|
+
border-radius: ${({borderRadius:e})=>e[3]};
|
|
192
|
+
background-color: ${({tokens:e})=>e.theme.foregroundPrimary};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.direction-icon,
|
|
196
|
+
.status-image {
|
|
197
|
+
position: absolute;
|
|
198
|
+
right: 0;
|
|
199
|
+
bottom: 0;
|
|
200
|
+
border-radius: ${({borderRadius:e})=>e[128]};
|
|
201
|
+
border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.direction-icon {
|
|
205
|
+
padding: ${({spacing:e})=>e["01"]};
|
|
206
|
+
color: ${({tokens:e})=>e.core.iconSuccess};
|
|
207
|
+
|
|
208
|
+
background-color: color-mix(
|
|
209
|
+
in srgb,
|
|
210
|
+
${({tokens:e})=>e.core.textSuccess} 30%,
|
|
211
|
+
${({tokens:e})=>e.theme.backgroundPrimary} 70%
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* -- Sizes --------------------------------------------------- */
|
|
216
|
+
:host([data-size='sm']) > wui-image:not(.status-image),
|
|
217
|
+
:host([data-size='sm']) > wui-flex {
|
|
218
|
+
width: 24px;
|
|
219
|
+
height: 24px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:host([data-size='lg']) > wui-image:not(.status-image),
|
|
223
|
+
:host([data-size='lg']) > wui-flex {
|
|
224
|
+
width: 40px;
|
|
225
|
+
height: 40px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:host([data-size='sm']) .fallback-icon {
|
|
229
|
+
height: 16px;
|
|
230
|
+
width: 16px;
|
|
231
|
+
padding: ${({spacing:e})=>e[1]};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host([data-size='lg']) .fallback-icon {
|
|
235
|
+
height: 32px;
|
|
236
|
+
width: 32px;
|
|
237
|
+
padding: ${({spacing:e})=>e[1]};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:host([data-size='sm']) .direction-icon,
|
|
241
|
+
:host([data-size='sm']) .status-image {
|
|
242
|
+
transform: translate(40%, 30%);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host([data-size='lg']) .direction-icon,
|
|
246
|
+
:host([data-size='lg']) .status-image {
|
|
247
|
+
transform: translate(40%, 10%);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:host([data-size='sm']) .status-image {
|
|
251
|
+
height: 14px;
|
|
252
|
+
width: 14px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:host([data-size='lg']) .status-image {
|
|
256
|
+
height: 20px;
|
|
257
|
+
width: 20px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* -- Crop effects --------------------------------------------------- */
|
|
261
|
+
.swap-crop-left-image,
|
|
262
|
+
.swap-crop-right-image {
|
|
263
|
+
position: absolute;
|
|
264
|
+
top: 0;
|
|
265
|
+
bottom: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.swap-crop-left-image {
|
|
269
|
+
left: 0;
|
|
270
|
+
clip-path: inset(0px calc(50% + 1.5px) 0px 0%);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.swap-crop-right-image {
|
|
274
|
+
right: 0;
|
|
275
|
+
clip-path: inset(0px 0px 0px calc(50% + 1.5px));
|
|
276
|
+
}
|
|
277
|
+
`;var C=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};const L={sm:"xxs",lg:"md"};let y=class extends O{constructor(){super(...arguments),this.type="approve",this.size="lg",this.statusImageUrl="",this.images=[]}render(){return c`<wui-flex>${this.templateVisual()} ${this.templateIcon()}</wui-flex>`}templateVisual(){switch(this.dataset.size=this.size,this.type){case"trade":return this.swapTemplate();case"fiat":return this.fiatTemplate();case"unknown":return this.unknownTemplate();default:return this.tokenTemplate()}}swapTemplate(){const[t,i]=this.images;return this.images.length===2&&(t||i)?c`
|
|
278
|
+
<wui-image class="swap-crop-left-image" src=${t} alt="Swap image"></wui-image>
|
|
279
|
+
<wui-image class="swap-crop-right-image" src=${i} alt="Swap image"></wui-image>
|
|
280
|
+
`:t?c`<wui-image src=${t} alt="Swap image"></wui-image>`:null}fiatTemplate(){return c`<wui-icon
|
|
281
|
+
class="fallback-icon"
|
|
282
|
+
size=${L[this.size]}
|
|
283
|
+
name="dollar"
|
|
284
|
+
></wui-icon>`}unknownTemplate(){return c`<wui-icon
|
|
285
|
+
class="fallback-icon"
|
|
286
|
+
size=${L[this.size]}
|
|
287
|
+
name="questionMark"
|
|
288
|
+
></wui-icon>`}tokenTemplate(){const[t]=this.images;return t?c`<wui-image src=${t} alt="Token image"></wui-image> `:c`<wui-icon
|
|
289
|
+
class="fallback-icon"
|
|
290
|
+
name=${this.type==="nft"?"image":"coinPlaceholder"}
|
|
291
|
+
></wui-icon>`}templateIcon(){return this.statusImageUrl?c`<wui-image
|
|
292
|
+
class="status-image"
|
|
293
|
+
src=${this.statusImageUrl}
|
|
294
|
+
alt="Status image"
|
|
295
|
+
></wui-image>`:c`<wui-icon
|
|
296
|
+
class="direction-icon"
|
|
297
|
+
size=${L[this.size]}
|
|
298
|
+
name=${this.getTemplateIcon()}
|
|
299
|
+
></wui-icon>`}getTemplateIcon(){return this.type==="trade"?"arrowClockWise":"arrowBottom"}};y.styles=[ge];C([d()],y.prototype,"type",void 0);C([d()],y.prototype,"size",void 0);C([d()],y.prototype,"statusImageUrl",void 0);C([d({type:Array})],y.prototype,"images",void 0);y=C([_("wui-transaction-thumbnail")],y);const fe=A`
|
|
300
|
+
:host > wui-flex:first-child {
|
|
301
|
+
gap: ${({spacing:e})=>e[2]};
|
|
302
|
+
padding: ${({spacing:e})=>e[3]};
|
|
303
|
+
width: 100%;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
wui-flex {
|
|
307
|
+
display: flex;
|
|
308
|
+
flex: 1;
|
|
309
|
+
}
|
|
310
|
+
`;var we=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};let U=class extends O{render(){return c`
|
|
311
|
+
<wui-flex alignItems="center" .padding=${["1","2","1","2"]}>
|
|
312
|
+
<wui-shimmer width="40px" height="40px" rounded></wui-shimmer>
|
|
313
|
+
<wui-flex flexDirection="column" gap="1">
|
|
314
|
+
<wui-shimmer width="124px" height="16px" rounded></wui-shimmer>
|
|
315
|
+
<wui-shimmer width="60px" height="14px" rounded></wui-shimmer>
|
|
316
|
+
</wui-flex>
|
|
317
|
+
<wui-shimmer width="24px" height="12px" rounded></wui-shimmer>
|
|
318
|
+
</wui-flex>
|
|
319
|
+
`}};U.styles=[B,fe];U=we([_("wui-transaction-list-item-loader")],U);const xe=A`
|
|
320
|
+
:host {
|
|
321
|
+
min-height: 100%;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.group-container[last-group='true'] {
|
|
325
|
+
padding-bottom: ${({spacing:e})=>e[3]};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.contentContainer {
|
|
329
|
+
height: 280px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.contentContainer > wui-icon-box {
|
|
333
|
+
width: 40px;
|
|
334
|
+
height: 40px;
|
|
335
|
+
border-radius: ${({borderRadius:e})=>e[3]};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.contentContainer > .textContent {
|
|
339
|
+
width: 65%;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.emptyContainer {
|
|
343
|
+
height: 100%;
|
|
344
|
+
}
|
|
345
|
+
`;var b=function(e,t,i,r){var o=arguments.length,n=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(n=(o<3?a(n):o>3?a(t,i,n):a(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};const P="last-transaction",ye=7;let f=class extends O{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=R.state.activeCaipAddress,this.transactionsByYear=m.state.transactionsByYear,this.loading=m.state.loading,this.empty=m.state.empty,this.next=m.state.next,m.clearCursor(),this.unsubscribe.push(R.subscribeKey("activeCaipAddress",t=>{t&&this.caipAddress!==t&&(m.resetTransactions(),m.fetchTransactions(t)),this.caipAddress=t}),R.subscribeKey("activeCaipNetwork",()=>{this.updateTransactionView()}),m.subscribe(t=>{this.transactionsByYear=t.transactionsByYear,this.loading=t.loading,this.empty=t.empty,this.next=t.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return c` ${this.empty?null:this.templateTransactionsByYear()}
|
|
346
|
+
${this.loading?this.templateLoading():null}
|
|
347
|
+
${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){m.resetTransactions(),this.caipAddress&&m.fetchTransactions(j.getPlainAddress(this.caipAddress))}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(i=>{const r=parseInt(i,10),o=new Array(12).fill(null).map((n,a)=>{var u;const s=$.getTransactionGroupTitle(r,a),l=(u=this.transactionsByYear[r])==null?void 0:u[a];return{groupTitle:s,transactions:l}}).filter(({transactions:n})=>n).reverse();return o.map(({groupTitle:n,transactions:a},s)=>{const l=s===o.length-1;return a?c`
|
|
348
|
+
<wui-flex
|
|
349
|
+
flexDirection="column"
|
|
350
|
+
class="group-container"
|
|
351
|
+
last-group="${l?"true":"false"}"
|
|
352
|
+
data-testid="month-indexes"
|
|
353
|
+
>
|
|
354
|
+
<wui-flex
|
|
355
|
+
alignItems="center"
|
|
356
|
+
flexDirection="row"
|
|
357
|
+
.padding=${["2","3","3","3"]}
|
|
358
|
+
>
|
|
359
|
+
<wui-text variant="md-medium" color="secondary" data-testid="group-title">
|
|
360
|
+
${n}
|
|
361
|
+
</wui-text>
|
|
362
|
+
</wui-flex>
|
|
363
|
+
<wui-flex flexDirection="column" gap="2">
|
|
364
|
+
${this.templateTransactions(a,l)}
|
|
365
|
+
</wui-flex>
|
|
366
|
+
</wui-flex>
|
|
367
|
+
`:null})})}templateRenderTransaction(t,i){const{date:r,descriptions:o,direction:n,images:a,status:s,type:l,transfers:u,isAllNFT:p}=this.getTransactionListItemProps(t);return c`
|
|
368
|
+
<wui-transaction-list-item
|
|
369
|
+
date=${r}
|
|
370
|
+
.direction=${n}
|
|
371
|
+
id=${i&&this.next?P:""}
|
|
372
|
+
status=${s}
|
|
373
|
+
type=${l}
|
|
374
|
+
.images=${a}
|
|
375
|
+
.onlyDirectionIcon=${p||u.length===1}
|
|
376
|
+
.descriptions=${o}
|
|
377
|
+
></wui-transaction-list-item>
|
|
378
|
+
`}templateTransactions(t,i){return t.map((r,o)=>{const n=i&&o===t.length-1;return c`${this.templateRenderTransaction(r,n)}`})}emptyStateActivity(){return c`<wui-flex
|
|
379
|
+
class="emptyContainer"
|
|
380
|
+
flexGrow="1"
|
|
381
|
+
flexDirection="column"
|
|
382
|
+
justifyContent="center"
|
|
383
|
+
alignItems="center"
|
|
384
|
+
.padding=${["10","5","10","5"]}
|
|
385
|
+
gap="5"
|
|
386
|
+
data-testid="empty-activity-state"
|
|
387
|
+
>
|
|
388
|
+
<wui-icon-box color="default" icon="wallet" size="xl"></wui-icon-box>
|
|
389
|
+
<wui-flex flexDirection="column" alignItems="center" gap="2">
|
|
390
|
+
<wui-text align="center" variant="lg-medium" color="primary">No Transactions yet</wui-text>
|
|
391
|
+
<wui-text align="center" variant="lg-regular" color="secondary"
|
|
392
|
+
>Start trading on dApps <br />
|
|
393
|
+
to grow your wallet!</wui-text
|
|
394
|
+
>
|
|
395
|
+
</wui-flex>
|
|
396
|
+
</wui-flex>`}emptyStateAccount(){return c`<wui-flex
|
|
397
|
+
class="contentContainer"
|
|
398
|
+
alignItems="center"
|
|
399
|
+
justifyContent="center"
|
|
400
|
+
flexDirection="column"
|
|
401
|
+
gap="4"
|
|
402
|
+
data-testid="empty-account-state"
|
|
403
|
+
>
|
|
404
|
+
<wui-icon-box icon="swapHorizontal" size="lg" color="default"></wui-icon-box>
|
|
405
|
+
<wui-flex
|
|
406
|
+
class="textContent"
|
|
407
|
+
gap="2"
|
|
408
|
+
flexDirection="column"
|
|
409
|
+
justifyContent="center"
|
|
410
|
+
flexDirection="column"
|
|
411
|
+
>
|
|
412
|
+
<wui-text variant="md-regular" align="center" color="primary">No activity yet</wui-text>
|
|
413
|
+
<wui-text variant="sm-regular" align="center" color="secondary"
|
|
414
|
+
>Your next transactions will appear here</wui-text
|
|
415
|
+
>
|
|
416
|
+
</wui-flex>
|
|
417
|
+
<wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
|
|
418
|
+
</wui-flex>`}templateEmpty(){return this.page==="account"?c`${this.emptyStateAccount()}`:c`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?c` <wui-flex flexDirection="column" width="100%">
|
|
419
|
+
<wui-flex .padding=${["2","3","3","3"]}>
|
|
420
|
+
<wui-shimmer width="70px" height="16px" rounded></wui-shimmer>
|
|
421
|
+
</wui-flex>
|
|
422
|
+
<wui-flex flexDirection="column" gap="2" width="100%">
|
|
423
|
+
${Array(ye).fill(c` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(t=>t)}
|
|
424
|
+
</wui-flex>
|
|
425
|
+
</wui-flex>`:null}onReceiveClick(){Y.push("WalletReceive")}createPaginationObserver(){const{projectId:t}=G.state;this.paginationObserver=new IntersectionObserver(([i])=>{i!=null&&i.isIntersecting&&!this.loading&&(m.fetchTransactions(j.getPlainAddress(this.caipAddress)),V.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:j.getPlainAddress(this.caipAddress),projectId:t,cursor:this.next,isSmartAccount:W(R.state.activeChain)===H.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var i,r,o;(i=this.paginationObserver)==null||i.disconnect();const t=(r=this.shadowRoot)==null?void 0:r.querySelector(`#${P}`);t&&((o=this.paginationObserver)==null||o.observe(t))}getTransactionListItemProps(t){var l,u,p;const i=z.formatDate((l=t==null?void 0:t.metadata)==null?void 0:l.minedAt),r=$.mergeTransfers((t==null?void 0:t.transfers)||[]),o=$.getTransactionDescriptions(t,r),n=r==null?void 0:r[0],a=!!n&&(r==null?void 0:r.every(D=>!!D.nft_info)),s=$.getTransactionImages(r);return{date:i,direction:n==null?void 0:n.direction,descriptions:o,isAllNFT:a,images:s,status:(u=t.metadata)==null?void 0:u.status,transfers:r,type:(p=t.metadata)==null?void 0:p.operationType}}};f.styles=xe;b([d()],f.prototype,"page",void 0);b([T()],f.prototype,"caipAddress",void 0);b([T()],f.prototype,"transactionsByYear",void 0);b([T()],f.prototype,"loading",void 0);b([T()],f.prototype,"empty",void 0);b([T()],f.prototype,"next",void 0);f=b([_("w3m-activity-list")],f);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as u,r as p,l as g,m as c}from"./index-BZ5gnlzQ.js";import{n as r,c as f}from"./index-oxCQrPLS.js";import{o as m}from"./if-defined-B86bHg5H.js";const b=u`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
width: var(--local-width);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as d,r as m,k as c,l as f,v,m as h}from"./index-BZ5gnlzQ.js";import{n as r,c as y,U as b}from"./index-oxCQrPLS.js";import{e as g,n as w}from"./ref-BmzgZKYC.js";const x=d`
|
|
2
2
|
:host {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/in-app-wallet-calls-DUG7H8lh.js","assets/thirdweb-BSAiHs-1.js","assets/index-C2O1ber7.js","assets/send-eip712-transaction-lfdbYUH7.js","assets/parse-typed-data-BHOkxJgZ.js","assets/types-DC0Zmj1B.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as A,y as M,j as R,i as g,J as I,K as P,M as U,N as B,O as H,P as y,Q as W,R as V,S as O,_ as b,T as L,k as F,m as h,r as D,B as N,U as $,o as k,b as z}from"./thirdweb-BSAiHs-1.js";import{s as j}from"./types-DC0Zmj1B.js";function q(n){let e;return()=>(e||(e=n()),e)}function K(n={}){return A({filters:n,signature:"event UserOperationRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function Z(n={}){return A({filters:n,signature:"event PostOpRevertReason(bytes32 indexed userOpHash, address indexed sender, uint256 nonce, bytes revertReason)"})}function J(n){const{receipt:e}=n,t={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs,status:e.status,to:e.to?e.to:null,transactionHash:e.transactionHash,transactionIndex:e.transactionIndex,type:e.type};return e.blobGasPrice&&(t.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(t.blobGasUsed=BigInt(e.blobGasUsed)),{...n,actualGasCost:BigInt(n.actualGasCost),actualGasUsed:BigInt(n.actualGasUsed),nonce:BigInt(n.nonce),receipt:t,userOpHash:n.userOpHash}}const fe=()=>{const n=BigInt(Math.floor(Math.random()*4294967296)),e=BigInt(Math.floor(Math.random()*4294967296)),t=BigInt(Math.floor(Math.random()*4294967296)),r=BigInt(Math.floor(Math.random()*4294967296)),o=BigInt(Math.floor(Math.random()*4294967296)),p=BigInt(Math.floor(Math.random()*4294967296));return n<<BigInt(160)|e<<BigInt(128)|t<<BigInt(96)|r<<BigInt(64)|o<<BigInt(32)|p};function E(n){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,t==null||R(t)?t:M(t)]))}async function ge(n){return d({...n,operation:"eth_sendUserOperation",params:[E(n.userOp),n.options.entrypointAddress??U]})}async function we(n,e){const t=await d({...n,operation:"eth_estimateUserOperationGas",params:[E(n.userOp),n.options.entrypointAddress??U,e??{}]});return{callGasLimit:y(t.callGasLimit)+W,paymasterPostOpGasLimit:t.paymasterPostOpGasLimit!==void 0?y(t.paymasterPostOpGasLimit):void 0,paymasterVerificationGasLimit:t.paymasterVerificationGasLimit!==void 0?y(t.paymasterVerificationGasLimit):void 0,preVerificationGas:y(t.preVerificationGas),verificationGas:t.verificationGas!==void 0?y(t.verificationGas):void 0,verificationGasLimit:y(t.verificationGasLimit)}}async function Se(n){const e=await d({...n,operation:"thirdweb_getUserOperationGasPrice",params:[]});return{maxFeePerGas:y(e.maxFeePerGas),maxPriorityFeePerGas:y(e.maxPriorityFeePerGas)}}async function Le(n){var t,r;const e=await Q(n);if(e){if(e.success===!1){const p=(r=(t=B({events:[K(),Z()],logs:e.logs})[0])==null?void 0:t.args)==null?void 0:r.revertReason;if(!p)throw new Error(`UserOp failed at txHash: ${e.receipt.transactionHash}`);const a=H({data:p});throw new Error(`UserOp failed with reason: '${a.args.join(",")}' at txHash: ${e.receipt.transactionHash}`)}return e.receipt}}async function Q(n){const e=await d({operation:"eth_getUserOperationReceipt",options:n,params:[n.userOpHash]});if(e)return J(e)}async function ve(n){const e=await d({operation:"zk_paymasterData",options:n.options,params:[n.transaction]});return{paymaster:e.paymaster,paymasterInput:e.paymasterInput}}async function Y(n){const e=await d({...n,operation:"tw_execute",params:[n.eoaAddress,n.wrappedCalls,n.signature,n.authorization]});if(!e.queueId)throw new Error(`Error executing 7702 transaction: ${g(e)}`);return{transactionId:e.queueId}}async function X(n){return{transactionHash:(await d({...n,operation:"tw_getTransactionHash",params:[n.transactionId]})).transactionHash}}async function xe(n){return{transactionHash:(await d({operation:"zk_broadcastTransaction",options:n.options,params:[{...n.transaction,signedTransaction:n.signedTransaction}]})).transactionHash}}async function d(n){const{options:e,operation:t,params:r}=n,o=e.bundlerUrl??I(e.chain),a=await P(e.client)(o,{useAuthToken:!0,body:g({id:1,jsonrpc:"2.0",method:t,params:r}),headers:{"Content-Type":"application/json"},method:"POST"}),i=await a.json();if(!a.ok||i.error){let s=i.error||a.statusText;typeof s=="object"&&(s=g(s));const u=i.code||"UNKNOWN";throw new Error(`${t} error: ${s}
|
|
3
|
+
Status: ${a.status}
|
|
4
|
+
Code: ${u}`)}return i.result}const ee=V({blockExplorers:[{name:"Etherscan",url:"https://etherscan.io"}],id:1,name:"Ethereum",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"}}),te="0x3f707e6b",ne=[{type:"tuple[]",name:"calls",components:[{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}]}],ae=[];function ie(n){const e=q(async()=>"asyncParams"in n?await n.asyncParams():n);return O({contract:n.contract,method:[te,ne,ae],params:async()=>[(await e()).calls],value:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.value},accessList:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.accessList},gas:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.gas},gasPrice:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.gasPrice},maxFeePerGas:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.maxFeePerGas},maxPriorityFeePerGas:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.maxPriorityFeePerGas},nonce:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.nonce},extraGas:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.extraGas},erc20Value:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.erc20Value},authorizationList:async()=>{var t;return(t=(await e()).overrides)==null?void 0:t.authorizationList}})}async function se(n){const{client:e,chain:t,bundlerUrl:r}=n,o=r??I(t),p=`delegation-contract:${o}`;return $(async()=>{var u;const i=await P(e)(o,{useAuthToken:!0,body:g({id:1,jsonrpc:"2.0",method:"tw_getDelegationContract",params:[]}),headers:{"Content-Type":"application/json"},method:"POST"});if(!i.ok)throw new Error(`Failed to fetch delegation contract: ${i.status} ${i.statusText}`);const s=await i.json();if(s.error)throw new Error(`Delegation contract RPC error: ${JSON.stringify(s.error)}`);if(!((u=s.result)!=null&&u.delegationContract))throw new Error("Invalid response: missing delegationContract in result");return s.result.delegationContract},{cacheKey:p,cacheTime:1440*60*1e3})}const re=n=>{const{client:e,adminAccount:t,sponsorGas:r}=n,o=async a=>{var v,x,C;const i=a[0];if(!i)throw new Error("No transactions provided");const s=L(i.chainId),u=F({address:t.address,chain:s,client:e,abi:ce});let c=(v=i.authorizationList)==null?void 0:v[0];const m=await se({client:e,chain:s});if(c&&((x=c.address)==null?void 0:x.toLowerCase())!==m.toLowerCase())throw new Error(`Authorization address does not match expected delegation contract address. Expected ${m} but got ${c.address}`);if(!c&&!await pe(u,m)){let T=i.nonce?BigInt(i.nonce):BigInt(await oe({client:e,address:t.address,chain:s}));T+=r?0n:1n;const f=await((C=t.signAuthorization)==null?void 0:C.call(t,{address:h(m),chainId:i.chainId,nonce:T}));if(!f)throw new Error("Failed to sign authorization");c=f}if(r){const l={calls:a.map(S=>({data:S.data??"0x",target:h(S.to??""),value:S.value??0n})),uid:D()},T=await t.signTypedData({domain:{chainId:i.chainId,name:"MinimalAccount",verifyingContract:u.address,version:"1"},message:l,primaryType:"WrappedCalls",types:{Call:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],WrappedCalls:[{name:"calls",type:"Call[]"},{name:"uid",type:"bytes32"}]}}),f=await Y({authorization:c,eoaAddress:h(t.address),options:{chain:L(i.chainId),client:e},signature:T,wrappedCalls:l});return{transactionHash:await ue({options:{chain:L(i.chainId),client:e},transactionId:f.transactionId})}}const w=ie({calls:a.map(l=>({data:l.data??"0x",target:h(l.to??""),value:l.value??0n})),contract:u,overrides:{authorizationList:c?[c]:void 0,value:a.reduce((l,T)=>l+(T.value??0n),0n)}}),_=await N({from:t.address,transaction:w});return t.sendTransaction(_)},p={address:t.address,sendBatchTransaction:async a=>o(a),sendTransaction:async a=>o([a]),signMessage:({message:a,originalMessage:i,chainId:s})=>t.signMessage({chainId:s,message:a,originalMessage:i}),signTypedData:a=>t.signTypedData(a),sendCalls:async a=>{const{inAppWalletSendCalls:i}=await b(async()=>{const{inAppWalletSendCalls:w}=await import("./in-app-wallet-calls-DUG7H8lh.js");return{inAppWalletSendCalls:w}},__vite__mapDeps([0,1])),s=a.calls[0];if(!s)throw new Error("No calls to send");const u=s.client,c=s.chain||a.chain,m=await i({account:p,calls:a.calls,chain:c});return{chain:c,client:u,id:m}},getCallsStatus:async a=>{const{inAppWalletGetCallsStatus:i}=await b(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-DUG7H8lh.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([0,1]));return i(a)},getCallsStatusRaw:async a=>{const{inAppWalletGetCallsStatusRaw:i}=await b(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-DUG7H8lh.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([0,1]));return i(a)},getCapabilities:async a=>({[a.chainId??1]:{atomic:{status:"supported"},paymasterService:{supported:r??!1}}})};return p};async function oe(n){const{client:e,address:t,chain:r}=n,o=z({chain:r,client:e});return await b(async()=>{const{eth_getTransactionCount:a}=await import("./thirdweb-BSAiHs-1.js").then(i=>i.ax);return{eth_getTransactionCount:a}},[]).then(({eth_getTransactionCount:a})=>a(o,{address:h(t),blockTag:"pending"}))}async function pe(n,e){const t=await k(n),r=t.length>0&&t.startsWith("0xef0100"),o=`0x${t.slice(8,48)}`;return r&&o.toLowerCase()===e.toLowerCase()}async function ue(n){const e=n.timeoutMs||3e5,t=n.intervalMs||1e3,r=Date.now()+e;for(;Date.now()<r;){const o=await X({options:n.options,transactionId:n.transactionId});if(o.transactionHash)return o.transactionHash;await new Promise(p=>setTimeout(p,t))}throw new Error(`Timeout waiting for transaction to be mined on chain ${n.options.chain.id} with transactionId: ${n.transactionId}`)}const ce=[{type:"receive",stateMutability:"payable"},{type:"function",name:"createSessionWithSig",inputs:[{name:"sessionSpec",type:"tuple",internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"eip712Domain",inputs:[],outputs:[{name:"fields",type:"bytes1",internalType:"bytes1"},{name:"name",type:"string",internalType:"string"},{name:"version",type:"string",internalType:"string"},{name:"chainId",type:"uint256",internalType:"uint256"},{name:"verifyingContract",type:"address",internalType:"address"},{name:"salt",type:"bytes32",internalType:"bytes32"},{name:"extensions",type:"uint256[]",internalType:"uint256[]"}],stateMutability:"view"},{type:"function",name:"execute",inputs:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]}],outputs:[],stateMutability:"payable"},{type:"function",name:"executeWithSig",inputs:[{name:"wrappedCalls",type:"tuple",internalType:"struct WrappedCalls",components:[{name:"calls",type:"tuple[]",internalType:"struct Call[]",components:[{name:"target",type:"address",internalType:"address"},{name:"value",type:"uint256",internalType:"uint256"},{name:"data",type:"bytes",internalType:"bytes"}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]},{name:"signature",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"payable"},{type:"function",name:"getCallPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]}],stateMutability:"view"},{type:"function",name:"getSessionExpirationForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getSessionStateForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple",internalType:"struct SessionLib.SessionState",components:[{name:"transferValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callValue",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]},{name:"callParams",type:"tuple[]",internalType:"struct SessionLib.LimitState[]",components:[{name:"remaining",type:"uint256",internalType:"uint256"},{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"index",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"getTransferPoliciesForSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}],stateMutability:"view"},{type:"function",name:"isWildcardSigner",inputs:[{name:"signer",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"onERC1155BatchReceived",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"uint256[]",internalType:"uint256[]"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC1155Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"onERC721Received",inputs:[{name:"",type:"address",internalType:"address"},{name:"",type:"address",internalType:"address"},{name:"",type:"uint256",internalType:"uint256"},{name:"",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes4",internalType:"bytes4"}],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"event",name:"Executed",inputs:[{name:"to",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"},{name:"data",type:"bytes",indexed:!1,internalType:"bytes"}],anonymous:!1},{type:"event",name:"SessionCreated",inputs:[{name:"signer",type:"address",indexed:!0,internalType:"address"},{name:"sessionSpec",type:"tuple",indexed:!1,internalType:"struct SessionLib.SessionSpec",components:[{name:"signer",type:"address",internalType:"address"},{name:"isWildcard",type:"bool",internalType:"bool"},{name:"expiresAt",type:"uint256",internalType:"uint256"},{name:"callPolicies",type:"tuple[]",internalType:"struct SessionLib.CallSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]},{name:"constraints",type:"tuple[]",internalType:"struct SessionLib.Constraint[]",components:[{name:"condition",type:"uint8",internalType:"enum SessionLib.Condition"},{name:"index",type:"uint64",internalType:"uint64"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"limit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]}]},{name:"transferPolicies",type:"tuple[]",internalType:"struct SessionLib.TransferSpec[]",components:[{name:"target",type:"address",internalType:"address"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"},{name:"valueLimit",type:"tuple",internalType:"struct SessionLib.UsageLimit",components:[{name:"limitType",type:"uint8",internalType:"enum SessionLib.LimitType"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint256",internalType:"uint256"}]}]},{name:"uid",type:"bytes32",internalType:"bytes32"}]}],anonymous:!1},{type:"event",name:"ValueReceived",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"value",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"error",name:"AllowanceExceeded",inputs:[{name:"allowanceUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"},{name:"period",type:"uint64",internalType:"uint64"}]},{type:"error",name:"CallPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"},{name:"selector",type:"bytes4",internalType:"bytes4"}]},{type:"error",name:"CallReverted",inputs:[]},{type:"error",name:"ConditionFailed",inputs:[{name:"param",type:"bytes32",internalType:"bytes32"},{name:"refValue",type:"bytes32",internalType:"bytes32"},{name:"condition",type:"uint8",internalType:"uint8"}]},{type:"error",name:"InvalidDataLength",inputs:[{name:"actualLength",type:"uint256",internalType:"uint256"},{name:"expectedLength",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidSignature",inputs:[{name:"msgSender",type:"address",internalType:"address"},{name:"thisAddress",type:"address",internalType:"address"}]},{type:"error",name:"LifetimeUsageExceeded",inputs:[{name:"lifetimeUsage",type:"uint256",internalType:"uint256"},{name:"limit",type:"uint256",internalType:"uint256"}]},{type:"error",name:"MaxValueExceeded",inputs:[{name:"value",type:"uint256",internalType:"uint256"},{name:"maxValuePerUse",type:"uint256",internalType:"uint256"}]},{type:"error",name:"NoCallsToExecute",inputs:[]},{type:"error",name:"SessionExpired",inputs:[]},{type:"error",name:"SessionExpiresTooSoon",inputs:[]},{type:"error",name:"SessionZeroSigner",inputs:[]},{type:"error",name:"TransferPolicyViolated",inputs:[{name:"target",type:"address",internalType:"address"}]},{type:"error",name:"UIDAlreadyProcessed",inputs:[]}];async function le(n,e,t){var p,a,i,s;if(((p=e==null?void 0:e.auth)==null?void 0:p.mode)!=="popup"&&((a=e==null?void 0:e.auth)==null?void 0:a.mode)!==void 0&&t.authenticateWithRedirect){const u=n.strategy;j.includes(u)&&await t.authenticateWithRedirect(u,(i=e==null?void 0:e.auth)==null?void 0:i.mode,(s=e==null?void 0:e.auth)==null?void 0:s.redirectUrl)}const o=(await t.connect(n)).user.account;return G({authAccount:o,client:n.client,createOptions:e,desiredChain:n.chain})}async function ye(n,e,t){n.authResult&&t.loginWithAuthToken&&await t.loginWithAuthToken(n.authResult);const r=await me(t);if(!r)throw new Error("Failed to authenticate user.");const o=r.account;return G({authAccount:o,client:n.client,createOptions:e,desiredChain:n.chain})}async function de(n){const{connectSmartAccount:e}=await b(async()=>{const{connectSmartAccount:t}=await import("./index-C2O1ber7.js");return{connectSmartAccount:t}},__vite__mapDeps([2,1,3,4,5]));return e({chain:n.chain,client:n.client,personalAccount:n.authAccount},n.smartAccountOptions)}async function me(n){const e=await n.getUser();switch(e.status){case"Logged In, Wallet Initialized":return e}}async function G(n){const{createOptions:e,authAccount:t,desiredChain:r,client:o}=n;let p,a;const i=e&&"executionMode"in e?e.executionMode:void 0;if(i&&(i.mode==="EIP4337"?p=i.smartAccount:i.mode==="EIP7702"&&(a=i)),e&&"smartAccount"in e&&(e!=null&&e.smartAccount)&&(p=e.smartAccount),p){const[s,u]=await de({authAccount:t,chain:r,client:o,smartAccountOptions:p});return{account:s,adminAccount:t,chain:u}}if(a){const s=r;if(!s)throw new Error("Chain is required for EIP-7702 execution, pass a chain when connecting the inAppWallet.");return{account:re({adminAccount:t,client:o,sponsorGas:a.sponsorGas}),adminAccount:t,chain:s}}return{account:t,chain:r||ee}}const Ce=Object.freeze(Object.defineProperty({__proto__:null,autoConnectInAppWallet:ye,connectInAppWallet:le},Symbol.toStringTag,{value:"Module"}));export{Se as a,fe as b,ve as c,xe as d,we as e,ge as f,Le as g,E as h,Ce as i,q as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as h,l as d,O as c,m as a,E as x,q as b,C as g,W as v,R as C,j as w,r as _,k as $}from"./index-BZ5gnlzQ.js";import{c as m,r as R}from"./index-oxCQrPLS.js";import"./index-plGxIRIg.js";const T=h``;var O=function(n,e,r,o){var i=arguments.length,t=i<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,r,o);else for(var l=n.length-1;l>=0;l--)(s=n[l])&&(t=(i<3?s(t):i>3?s(e,r,t):s(e,r))||t);return i>3&&t&&Object.defineProperty(e,r,t),t};let f=class extends d{render(){const{termsConditionsUrl:e,privacyPolicyUrl:r}=c.state;return!e&&!r?null:a`
|
|
2
2
|
<wui-flex
|
|
3
3
|
.padding=${["4","3","3","3"]}
|
|
4
4
|
flexDirection="column"
|
|
@@ -48,7 +48,7 @@ import{t as h,o as d,O as c,q as a,E as x,y as b,C as g,W as v,R as C,m as w,r a
|
|
|
48
48
|
<wui-icon name="reown" size="inherit" class="reown-logo"></wui-icon>
|
|
49
49
|
</wui-flex>
|
|
50
50
|
</a>
|
|
51
|
-
`}};p.styles=[_,$,W];p=U([m("wui-ux-by-reown")],p);const
|
|
51
|
+
`}};p.styles=[_,$,W];p=U([m("wui-ux-by-reown")],p);const j=w`
|
|
52
52
|
:host wui-ux-by-reown {
|
|
53
53
|
padding-top: 0;
|
|
54
54
|
}
|
|
@@ -78,4 +78,4 @@ import{t as h,o as d,O as c,q as a,E as x,y as b,C as g,W as v,R as C,m as w,r a
|
|
|
78
78
|
>Terms of Service</a
|
|
79
79
|
>`:null}privacyTemplate(){const{privacyPolicyUrl:e}=c.state;return e?a`<a href=${e} target="_blank" rel="noopener noreferrer"
|
|
80
80
|
>Privacy Policy</a
|
|
81
|
-
>`:null}reownBrandingTemplate(e=!1){var r;return(r=this.remoteFeatures)!=null&&r.reownBranding?e?a`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>`:a`<wui-ux-by-reown></wui-ux-by-reown>`:null}};u.styles=[
|
|
81
|
+
>`:null}reownBrandingTemplate(e=!1){var r;return(r=this.remoteFeatures)!=null&&r.reownBranding?e?a`<wui-ux-by-reown class="branding-only"></wui-ux-by-reown>`:a`<wui-ux-by-reown></wui-ux-by-reown>`:null}};u.styles=[j];y([R()],u.prototype,"remoteFeatures",void 0);u=y([m("w3m-legal-footer")],u);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PhArrowCircleDown-B305t-Sh.js","assets/property-C9JG5tag.js","assets/PhArrowClockwise-CJPxQhr_.js","assets/PhArrowDown-C4hT9BVu.js","assets/PhArrowLeft-Way4Cu-r.js","assets/PhArrowRight-Cp5ZME0F.js","assets/PhArrowSquareOut-NnrK69c5.js","assets/PhArrowsDownUp-BjBI4ckC.js","assets/PhArrowsLeftRight-CuLpbKRk.js","assets/PhArrowUp-Dph6j8rm.js","assets/PhArrowUpRight-BpJjRRRh.js","assets/PhArrowsClockwise-CFUT8X7R.js","assets/PhBank-Dchr4XQJ.js","assets/PhBrowser-dUu2TrC1.js","assets/PhCaretDown-78IuKU3V.js","assets/PhCaretLeft-_aiyH7n1.js","assets/PhCaretRight-8zJQEuDX.js","assets/PhCaretUp-CiCxKWwN.js","assets/PhCheck-CcADx8br.js","assets/PhCircleHalf-BYzSzd2h.js","assets/PhClock-UItiXeJq.js","assets/PhCompass-CUy3uA7t.js","assets/PhCopy-C-PDgSlZ.js","assets/PhCreditCard-CWRaUT6F.js","assets/PhCurrencyDollar-Cqla3AXT.js","assets/PhDesktop-BBIPrYLl.js","assets/PhDeviceMobile-BdsPaATg.js","assets/PhDotsThree-BMXCQl-0.js","assets/PhVault-l2PHF38a.js","assets/PhEnvelope-yUsis6yU.js","assets/PhFunnelSimple-Ba7BbWTp.js","assets/PhGlobe-DgLxBk5U.js","assets/PhIdentificationCard-Czjmq9Z3.js","assets/PhImage-BAJ_erz6.js","assets/PhInfo-Cr4DhVUE.js","assets/PhLightbulb-BX_7duTr.js","assets/PhMagnifyingGlass-Mygfryvz.js","assets/PhPaperPlaneRight-BeuCA660.js","assets/PhPlus-BMjcHjsT.js","assets/PhPower-CGffGmdb.js","assets/PhPuzzlePiece-wm_GpVSi.js","assets/PhQrCode-DRwRzXCH.js","assets/PhQuestion-M09j2U0T.js","assets/PhQuestionMark-BP9EMB6h.js","assets/PhSealCheck-BfG80yKn.js","assets/PhSignOut-C5YOWlPT.js","assets/PhSpinner-BXooDYzU.js","assets/PhTrash-Biq6rmmL.js","assets/PhUser-CAgZSpGe.js","assets/PhWallet-w25D16It.js","assets/PhWarning-DPEydIPw.js","assets/PhWarningCircle-BqjT745H.js","assets/PhX-s-SmVExa.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{
|
|
2
|
+
import{a8 as A,a9 as T,n as V,r as y,l as x,m as E,D as s,v as g,aa as Z,j as I}from"./index-BZ5gnlzQ.js";import{_ as l}from"./thirdweb-BSAiHs-1.js";const L=".",v={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 i=Number(t);return isNaN(i)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2,...e}).format(i)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:i,truncate:o}){return t.length<=e+i?t:o==="end"?`${t.substring(0,e)}...`:o==="start"?`...${t.substring(t.length-i)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(i))}`},generateAvatarColors(t){const i=t.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),o=this.hexToRgb(i),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),a=100-3*Number(n==null?void 0:n.replace("px","")),h=`${a}% ${a}% at 65% 40%`,p=[];for(let d=0;d<5;d+=1){const m=this.tintColor(o,.15*d);p.push(`rgb(${m[0]}, ${m[1]}, ${m[2]})`)}return`
|
|
3
3
|
--local-color-1: ${p[0]};
|
|
4
4
|
--local-color-2: ${p[1]};
|
|
5
5
|
--local-color-3: ${p[2]};
|
|
@@ -337,7 +337,7 @@ import{ad as A,ae as T,t as V,r as y,o as x,q as E,I as s,v as g,af as I,m as Z}
|
|
|
337
337
|
* @license
|
|
338
338
|
* Copyright 2018 Google LLC
|
|
339
339
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
340
|
-
*/const L1=C1(class extends $1{constructor(t){var e;if(super(t),t.type!==w1.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var o,n;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((o=this.nt)!=null&&o.has(r))&&this.st.add(r);return this.render(e)}const i=t.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){const a=!!e[r];a===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(a?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return
|
|
340
|
+
*/const L1=C1(class extends $1{constructor(t){var e;if(super(t),t.type!==w1.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var o,n;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(const r in e)e[r]&&!((o=this.nt)!=null&&o.has(r))&&this.st.add(r);return this.render(e)}const i=t.element.classList;for(const r of this.st)r in e||(i.remove(r),this.st.delete(r));for(const r in e){const a=!!e[r];a===this.st.has(r)||(n=this.nt)!=null&&n.has(r)||(a?(i.add(r),this.st.add(r)):(i.remove(r),this.st.delete(r)))}return Z}}),y1=I`
|
|
341
341
|
slot {
|
|
342
342
|
width: 100%;
|
|
343
343
|
display: inline-block;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as b,r as p,k as m,l as f,m as l}from"./index-BZ5gnlzQ.js";import{n as d,c as v}from"./index-oxCQrPLS.js";const h=b`
|
|
2
2
|
button {
|
|
3
3
|
border: none;
|
|
4
4
|
background: transparent;
|