@dcl/shop 0.1.0-30491920077.commit-b636261 → 0.1.0-30497598696.commit-4ea1dde
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/{Activity-B1PUyPvs.js → Activity-B_s4shG9.js} +1 -1
- package/assets/{AnimatedBackground-TVJS-gH0.js → AnimatedBackground-DB5Ss4ap.js} +1 -1
- package/assets/{Assets-Dg2UL1q0.js → Assets-DGVOgeRG.js} +2 -2
- package/assets/{Assets.styles-DXfpYzAi.js → Assets.styles-BlqCpVPA.js} +1 -1
- package/assets/{Authorizations-D-4hw46l.js → Authorizations-ClSgzEm9.js} +1 -1
- package/assets/{Cart-CxyHlX2J.js → Cart-Cr7qdGKk.js} +2 -2
- package/assets/{CircularProgress-NzNCIVEM.js → CircularProgress-KUMU3U08.js} +1 -1
- package/assets/{Collection-pFKxEeja.js → Collection-97efqPC8.js} +1 -1
- package/assets/{CollectionCarousel-CTx_WmhK.js → CollectionCarousel-MJIfHIAG.js} +1 -1
- package/assets/{Creator-BB3XvV9Z.js → Creator-Bv3gNXme.js} +1 -1
- package/assets/{ErrorNotice-AcMffEAY.js → ErrorNotice-T3U1x2gM.js} +1 -1
- package/assets/{ExchangeController-wlmVCi1v.js → ExchangeController-GCK_R7Ey.js} +1 -1
- package/assets/{GetCredits-Dz-bnwEB.js → GetCredits-BJv8YlhP.js} +1 -1
- package/assets/{HelpersUtil-DcfnZGQ4.js → HelpersUtil-DRAzH_Eb.js} +1 -1
- package/assets/{ImportListings-CxprZUOI.js → ImportListings-X8oBIjzn.js} +27 -13
- package/assets/{ItemDetail-DhZQXVky.js → ItemDetail-DceF2pIM.js} +151 -151
- package/assets/{LoadMore-CbGw7_AZ.js → LoadMore-EzzDujll.js} +1 -1
- package/assets/{MenuList-BDM-Jnmn.js → MenuList-DzP2GuNW.js} +1 -1
- package/assets/{MyAssets-BwXozDej.js → MyAssets-BVAVBC1I.js} +1 -1
- package/assets/{MyFavorites-DBNdZQwR.js → MyFavorites-Bwu_IAMr.js} +1 -1
- package/assets/{NotFound-Dg3tao6l.js → NotFound-Br6vUFaQ.js} +1 -1
- package/assets/{NotificationsBell-B5rxWs0X.js → NotificationsBell-CpzWIV_f.js} +1 -1
- package/assets/{StoreSettings-RchStPPt.js → StoreSettings-CAGNuG5P.js} +1 -1
- package/assets/{Success-BXQb9XGi.js → Success-DATDpbL1.js} +1 -1
- package/assets/{SwapController-DpGp1Ynj.js → SwapController-0Egz5gvE.js} +1 -1
- package/assets/{Tooltip-CaPywNj_.js → Tooltip-DaxPnuDE.js} +1 -1
- package/assets/{TradeService-DK22dfVy.js → TradeService-DugSIG-T.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-CgZVr29H.js → W3MFrameProviderSingleton-CRyphTNj.js} +3 -3
- package/assets/{WebCryptoP256-DjQsZliH.js → WebCryptoP256-DDiLCxeu.js} +1 -1
- package/assets/{authorizations-CBQpjv0Y.js → authorizations-Dz891X4r.js} +1 -1
- package/assets/{basic-OCyD-MQ8.js → basic-7T85qGyt.js} +1 -1
- package/assets/{biconomy-CMy-5ybX.js → biconomy-CbuwbQ7f.js} +1 -1
- package/assets/{browseLayout.styles-nIInl7-_.js → browseLayout.styles-Cyml9DBN.js} +2 -2
- package/assets/{builder-102Lb9G5.js → builder-Di_i0uie.js} +1 -1
- package/assets/{buy-YzKhoSZr.js → buy-KTMkFDbF.js} +1 -1
- package/assets/{buy-gasless-DNXWk0IK.js → buy-gasless-Ce5WXr0l.js} +1 -1
- package/assets/{categories-fg4FNysa.js → categories-BtM8_SSI.js} +1 -1
- package/assets/{ccip-D7pzspy6.js → ccip-DNSvOrJz.js} +1 -1
- package/assets/{ccip-BlzuXBcO.js → ccip-NhvY-DuA.js} +1 -1
- package/assets/{clsx-DwIdSwcx.js → clsx-DZSbGRZP.js} +1 -1
- package/assets/{controller-BJZNt1wD.js → controller-2WxetY20.js} +2 -2
- package/assets/{core-FKpkmBFa.js → core-Xele3HnH.js} +4 -4
- package/assets/{createSvgIcon-DGQlBR6A.js → createSvgIcon-CAdQcjOA.js} +1 -1
- package/assets/{custom-CIyThiRk.js → custom-RQA18iWz.js} +1 -1
- package/assets/{data-capture-CfDNvCcR.js → data-capture-CZb0JOnd.js} +1 -1
- package/assets/{email-KcRIrjEE.js → email-DiUkHxNq.js} +1 -1
- package/assets/{embedded-wallet-Ce1sNhFM.js → embedded-wallet-46mRUp3B.js} +1 -1
- package/assets/{emotion-styled.browser.esm-Cz2UYW4L.js → emotion-styled.browser.esm-DgGrnFNo.js} +1 -1
- package/assets/{engine-CrjpfCPZ.js → engine-CBrsJEKs.js} +1 -1
- package/assets/{errors-D5A1rAhl.js → errors-JUBkzG87.js} +1 -1
- package/assets/{estimate-l1-fee-Dl1G4kze.js → estimate-l1-fee-Cs-PSPSm.js} +1 -1
- package/assets/{execute-CiexXudY.js → execute-Clg1mM_X.js} +2 -2
- package/assets/{features-DsYpCrnC.js → features-iVV39qjI.js} +1 -1
- package/assets/{fetchTokenMetadata-DWypYxbA.js → fetchTokenMetadata-JFitoLaN.js} +2 -2
- package/assets/{get-ecosystem-wallet-info-DZWKxVA6.js → get-ecosystem-wallet-info-BbqTZN-t.js} +1 -1
- package/assets/{getBalance-Cz6bGYhR.js → getBalance-BhKN1EHb.js} +1 -1
- package/assets/{getNFT-BZS561d1.js → getNFT-B9xXf-dO.js} +1 -1
- package/assets/{getNFT-720NoLwo.js → getNFT-CV15WhdD.js} +1 -1
- package/assets/{getThemeProps-FLQVbLMg.js → getThemeProps-D49OFksO.js} +1 -1
- package/assets/{grid.styles-DtrFzApp.js → grid.styles-beZx-O42.js} +1 -1
- package/assets/{hashTypedData-BILWs9dJ.js → hashTypedData-BG9Q-Idk.js} +1 -1
- package/assets/{hashTypedData-DCSgTQmF.js → hashTypedData-CrzHCRn3.js} +1 -1
- package/assets/{import-BJPDoosw.js → import-4RvqLrjt.js} +1 -1
- package/assets/{in-app-NKvMMEfv.js → in-app-B4RKRM1u.js} +1 -1
- package/assets/{in-app-wallet-calls-BajxVBH8.js → in-app-wallet-calls-CSGbWPV4.js} +1 -1
- package/assets/{index-DWqBh31y.js → index-5RCIEGJN.js} +1 -1
- package/assets/{index-D3ZrYxPz.js → index-B1bBhgOG.js} +1 -1
- package/assets/{index-COfMk8pw.js → index-B2lClF4r.js} +1 -1
- package/assets/{index-C6zvyoZv.js → index-B5OOzrw0.js} +1 -1
- package/assets/{index-B7orTJ4q.js → index-B6nk66gw.js} +1 -1
- package/assets/{index-ChU8wlCy.js → index-B9kD__eY.js} +1 -1
- package/assets/{index-CMFzXxIX.js → index-BEdImmf3.js} +2 -2
- package/assets/{index-Drskl51X.js → index-BOF2imBG.js} +1 -1
- package/assets/{index-BQAp3En-.js → index-BVMf-qn6.js} +1 -1
- package/assets/{index-Cg9dnh8b.js → index-BVOMemqH.js} +1 -1
- package/assets/{index-CkYD3Y0h.js → index-BYE8hYx-.js} +1 -1
- package/assets/{index-DyW_Wdzl.js → index-BiUDBy6C.js} +1 -1
- package/assets/{index-hV1Yn1B5.js → index-BjbR46a4.js} +1 -1
- package/assets/{index-CrcHD3o5.js → index-BtO7iASi.js} +1 -1
- package/assets/{index-qU86FliS.js → index-BvLvK2MW.js} +1 -1
- package/assets/{index-DecjPWBu.js → index-BwPbh62F.js} +1 -1
- package/assets/{index-KcjPp4F-.js → index-C0sxJ5xX.js} +3 -3
- package/assets/{index-D4PpnM4d.js → index-C6ODV4-L.js} +1 -1
- package/assets/{index-CjOntfrV.js → index-C7yagPy7.js} +1 -1
- package/assets/{index-DAgJW1gr.js → index-C8x4NMNb.js} +1 -1
- package/assets/{index-Czb_P6bY.js → index-C9aPSlyC.js} +111 -111
- package/assets/{index-B37cKX5v.js → index-CElkFvVm.js} +1 -1
- package/assets/{index-DQXbQePN.js → index-CIPbxoP5.js} +1 -1
- package/assets/{index-C51fg_o7.js → index-CMgkT5ZH.js} +1 -1
- package/assets/{index-DVmEcWE3.js → index-CcQtz-MR.js} +3 -3
- package/assets/{index-BsS1iZx_.js → index-CemA9uz4.js} +1 -1
- package/assets/{index-CKJj9-cA.js → index-CkI5XL5y.js} +1 -1
- package/assets/{index-BsH-rkvg.js → index-Co9OL6oW.js} +1 -1
- package/assets/{index-BSxUgJbK.js → index-CpgYRLFY.js} +2 -2
- package/assets/{index-CDkwk3uv.js → index-D4_KbPRN.js} +2 -2
- package/assets/{index-DCYqHavJ.js → index-D8e_T9CW.js} +1 -1
- package/assets/{index-DbGOPqdW.js → index-DAo8QTgz.js} +1 -1
- package/assets/{index-BJsueJq0.js → index-DG4sRlUX.js} +1 -1
- package/assets/{index-DiTVVm7E.js → index-DIDeduvS.js} +1 -1
- package/assets/{index-B0bMnciA.js → index-DJRbW62L.js} +1 -1
- package/assets/{index-DCNThdFK.js → index-DQqq6tsa.js} +1 -1
- package/assets/{index-D1allDkb.js → index-DWmHtPGK.js} +1 -1
- package/assets/{index-B8RL4ysF.js → index-Dd-jgJaZ.js} +1 -1
- package/assets/{index-C1GOiHEJ.js → index-DdaAtig5.js} +1 -1
- package/assets/{index-BSDt-TOn.js → index-DiUUPZT7.js} +1 -1
- package/assets/{index-CI5h_2tO.js → index-DjiJYFQu.js} +1 -1
- package/assets/{index-C8fZFdzo.js → index-Dk_pfUan.js} +1 -1
- package/assets/{index-BgYtilT2.js → index-DlLNQPiR.js} +1 -1
- package/assets/{index-B7EC32ed.js → index-DnQ9kkjE.js} +1 -1
- package/assets/{index-8_bleNab.js → index-DsXwCxFn.js} +1 -1
- package/assets/{index-DBaksDK_.js → index-Ftx7PR7I.js} +1 -1
- package/assets/{index-BqEB64AU.js → index-Jvvdliqx.js} +3 -3
- package/assets/{index-DzIOprpI.js → index-LUwrgypY.js} +1 -1
- package/assets/{index-B1lZILIS.js → index-O5oS9IfZ.js} +1 -1
- package/assets/{index-DppjTFXj.js → index-Rze78fpx.js} +1 -1
- package/assets/{index-DjEA7xwB.js → index-rYXL6QOv.js} +1 -1
- package/assets/{index.es-BowEO4n4.js → index.es-8XmDF3sU.js} +1 -1
- package/assets/{index.es-nVYBSx0q.js → index.es-CDI5J76a.js} +4 -4
- package/assets/{index.es-BdQmhh-2.js → index.es-h__2fQBA.js} +1 -1
- package/assets/{localBatchGatewayRequest-BKtZM-Qe.js → localBatchGatewayRequest-CNc2tb7Q.js} +1 -1
- package/assets/{mana-convert-BKXDkQzP.js → mana-convert-519jIoGv.js} +1 -1
- package/assets/{mana-rate-EViaZGqN.js → mana-rate-C-S8V8OH.js} +1 -1
- package/assets/{networks-CNY8UPfr.js → networks-CkEF1R2G.js} +1 -1
- package/assets/{onramp-DkE5Rw9T.js → onramp-BkPO4411.js} +1 -1
- package/assets/{openzeppelin-DxhZ29H0.js → openzeppelin-BbRuTYZV.js} +1 -1
- package/assets/{parseNft-zmNDvjeQ.js → parseNft-fkQ67kUG.js} +2 -2
- package/assets/{parseSignature-C1Ay4M4x.js → parseSignature-Cd8xeqSc.js} +1 -1
- package/assets/{parseSignature-D0zZ_iJp.js → parseSignature-DDbo_j_P.js} +3 -3
- package/assets/{passkeys-DfCeNvv_.js → passkeys-C2AoFBHz.js} +1 -1
- package/assets/{pay-with-exchange-CjKH2Vnu.js → pay-with-exchange-BZPweYB5.js} +1 -1
- package/assets/{qr-overlay-DKcOFez0.js → qr-overlay-KdBj8v0r.js} +1 -1
- package/assets/{receive-B1DDFUkH.js → receive-CFeT9xrk.js} +1 -1
- package/assets/{resolveImplementation-kR8NFXDP.js → resolveImplementation-DBJfh-FY.js} +1 -1
- package/assets/{rpc-CzGt6OT0.js → rpc-B2oNfk4l.js} +1 -1
- package/assets/{secp256k1-B2x_fUXG.js → secp256k1-DB5XegfY.js} +1 -1
- package/assets/{secp256k1-Dar84kjJ.js → secp256k1-DNCmoZeu.js} +1 -1
- package/assets/{secp256k1-DZ44C2PU.js → secp256k1-E5dSGQB7.js} +1 -1
- package/assets/{send-Cx4AaCX3.js → send-BzZFVa7V.js} +1 -1
- package/assets/{send-batch-transaction-Bf0o63Vf.js → send-batch-transaction-DmhNrrl2.js} +1 -1
- package/assets/{send-eip712-transaction-Bivcwwzr.js → send-eip712-transaction-Dpp-Tnhx.js} +2 -2
- package/assets/{send-gasless-transaction-Dh3lQi9l.js → send-gasless-transaction-S-k5TeaE.js} +2 -2
- package/assets/{send-transaction-D9t290rO.js → send-transaction-B44ZAxgB.js} +2 -2
- package/assets/{sendMetaTransaction-C0YDqCJk.js → sendMetaTransaction-Dgxdo_cy.js} +1 -1
- package/assets/{sendRawTransaction-BL7dRGJ_.js → sendRawTransaction-Djol22Yy.js} +3 -3
- package/assets/{serializeTransaction-jsQLtetC.js → serializeTransaction-Dgv65AON.js} +1 -1
- package/assets/{session-proposal-DMe52htu.js → session-proposal-DAuPQ12D.js} +1 -1
- package/assets/{session-request-CvcdX1D8.js → session-request-CBU8H1tR.js} +2 -2
- package/assets/{signing-C5rH_Fds.js → signing-D2AdVilf.js} +3 -3
- package/assets/{socials-DGbsF9Wj.js → socials-CuQWRkr5.js} +1 -1
- package/assets/{swaps-BFA3CceQ.js → swaps-LzxNCpsb.js} +1 -1
- package/assets/{thirdweb-iDY8G1WY.js → thirdweb-B0DOT-R5.js} +3 -3
- package/assets/{to-serializable-transaction-BG0Kqkd3.js → to-serializable-transaction-BeekAn8A.js} +2 -2
- package/assets/{trade-encoding-GuhikRmN.js → trade-encoding-BwYos8Ms.js} +1 -1
- package/assets/{transactionReceipt-cJ7HWOtq.js → transactionReceipt-BQu4Oof3.js} +1 -1
- package/assets/{transactions-C16e5T9v.js → transactions-iYCPh2Id.js} +1 -1
- package/assets/{useCreditPacks-DZTzWK5B.js → useCreditPacks-BN70ICff.js} +1 -1
- package/assets/{useInfiniteGrid-C3613jLi.js → useInfiniteGrid-_0aqBjgd.js} +1 -1
- package/assets/useManaRate-BrwJXTcH.js +1 -0
- package/assets/{useSecondarySales-DuNNHIPd.js → useSecondarySales-zW-UzRs8.js} +1 -1
- package/assets/{useStore-BTXlSV66.js → useStore-BmRyRgKo.js} +1 -1
- package/assets/{useTheme-CIMhjSM_.js → useTheme-QSimE3Um.js} +1 -1
- package/assets/{verifyHash-_9QIIq3n.js → verifyHash-DOqRIddZ.js} +1 -1
- package/assets/{w3m-modal-Cn_rTfFF.js → w3m-modal-ClJX2BXB.js} +1 -1
- package/assets/{w3m-modal-Ozmvjq7b.js → w3m-modal-hMvbKBgL.js} +1 -1
- package/assets/{wait-for-tx-receipt-BuZtG6lp.js → wait-for-tx-receipt-BZid7VP6.js} +1 -1
- package/assets/{wallets-Du25_N-1.js → wallets-U_fUqeG7.js} +5 -5
- package/assets/{web-connector-CWWf4u_L.js → web-connector-DT8PRFV7.js} +3 -3
- package/assets/{writeContract-DIiudXie.js → writeContract-BHlhXUjY.js} +1 -1
- package/assets/{zoraTestnet-B26jFGGx.js → zoraTestnet-B0nd7orZ.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/assets/useManaRate-CYlUk99_.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b,j as e,L as _,d as dt}from"./react-vyZjIDcS.js";import{aE as lt,s as l,t as o,w as ut,B as ht,l as xt,d,m as pt,u as j,I as g,aF as G,aG as R,aH as mt,y as v,aI as gt,al as E,z as Q,H as ft,aJ as yt,aK as X}from"./index-
|
|
1
|
+
import{r as b,j as e,L as _,d as dt}from"./react-vyZjIDcS.js";import{aE as lt,s as l,t as o,w as ut,B as ht,l as xt,d,m as pt,u as j,I as g,aF as G,aG as R,aH as mt,y as v,aI as gt,al as E,z as Q,H as ft,aJ as yt,aK as X}from"./index-C9aPSlyC.js";import{m as bt}from"./mana-convert-519jIoGv.js";import{u as jt}from"./useManaRate-BrwJXTcH.js";import{L as vt}from"./LoadMore-EzzDujll.js";import{u as f}from"./useInfiniteGrid-_0aqBjgd.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-rate-C-S8V8OH.js";const kt=15e3;function wt(t,i){return t.txHash&&i.txHash?t.txHash===i.txHash:t.txHash||i.txHash?!1:t.status===i.status&&Math.abs(t.createdAt-i.createdAt)<=kt}function It(t){const i=[...t].sort((a,n)=>n.createdAt-a.createdAt),s=[];for(const a of i){const n=s[s.length-1];n&&wt(n[n.length-1],a)?n.push(a):s.push([a])}return s.map(a=>{var n;return{id:((n=a.find(c=>c.txHash))==null?void 0:n.txHash)??a[a.length-1].id,createdAt:Math.max(...a.map(c=>c.createdAt)),status:a.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:a.reduce((c,h)=>c+h.credits,0),lines:a}})}function At(t){const i=[],s=new Map;for(const a of t)if(a.tradeId){const n=s.get(a.tradeId);if(n){n.quantity+=1,n.credits+=a.credits;continue}const c={key:a.tradeId,tradeId:a.tradeId,quantity:1,credits:a.credits};s.set(a.tradeId,c),i.push(c)}else i.push({key:a.id,tradeId:null,quantity:1,credits:a.credits});return i}function $t(t,i){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:i?bt(t.manaWei,i):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Pt(t){const s=It(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),a=t.sales.map(r=>{const x=$t(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),n=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...a,...n,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Lt(t,i){return i==="all"?t:i==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const J=t=>t.trim().toLowerCase();function Nt(t){const i=new Map;for(const s of t??[]){const a=J(s.txHash??"");if(!a)continue;const n=i.get(a);n?n.push(s):i.set(a,[s])}return i}function Et(t,i,s=Date.now()){const a=i.txHash?t.get(J(i.txHash)):void 0;if(!a||a.length===0)return{kind:"direct"};const n=a.length===1?Tt(a[0].netCents):null,c=a.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:n,availableAt:h}}function Tt(t){return lt(t)}const Ct="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/credits-product-vs4Q6u6l.svg",T=ut`
|
|
2
2
|
0% { background-position: 200% 0; }
|
|
3
3
|
100% { background-position: -200% 0; }
|
|
4
4
|
`,Ft=l.section`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-
|
|
1
|
+
import{r as l,j as v}from"./react-vyZjIDcS.js";import{s as u}from"./index-C9aPSlyC.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq as Ze,ar as Ke,b as Je,s as n,t,m as Ie,ai as Qe,D as Xe,H as Ae,x as Ye,d as s,I as R,y as W,aN as he,an as J,au as et,at as tt,l as Ne,n as nt,S as fe,A as O,aO as st,aP as ot}from"./index-
|
|
1
|
+
import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq as Ze,ar as Ke,b as Je,s as n,t,m as Ie,ai as Qe,D as Xe,H as Ae,x as Ye,d as s,I as R,y as W,aN as he,an as J,au as et,at as tt,l as Ne,n as nt,S as fe,A as O,aO as st,aP as ot}from"./index-C9aPSlyC.js";import{u as it}from"./useSecondarySales-zW-UzRs8.js";import{a as rt,m as Me}from"./mana-convert-519jIoGv.js";import{u as Pe}from"./useManaRate-BrwJXTcH.js";import{g as at,h as lt,i as ct,j as dt,k as pt,C as xt,l as ht,o as ft,m as mt,n as ut,M as gt,p as bt,E as yt,q as wt,r as jt,s as vt,t as $t,u as Ct,v as kt}from"./Assets.styles-BlqCpVPA.js";import{c as me,R as St,F as Et,S as Rt}from"./categories-BtM8_SSI.js";import{L as Tt}from"./LoadMore-EzzDujll.js";import{u as _t}from"./useInfiniteGrid-_0aqBjgd.js";import{E as zt}from"./ErrorNotice-T3U1x2gM.js";import{d as It}from"./dcl-schemas-BICTSpB5.js";import{s as At,G as Nt,w as Mt,S as Pt}from"./buy-gasless-Ce5WXr0l.js";import{s as Wt}from"./buy-KTMkFDbF.js";import{i as Bt}from"./trade-encoding-BwYos8Ms.js";import{r as Ft}from"./mana-rate-C-S8V8OH.js";import{f as Lt}from"./errors-JUBkzG87.js";import{J as Ht,C as Ut,B as ee}from"./ethers-CpLYx0ea.js";import{l as Ot}from"./loader-logo-BzY9EKdC.js";import{n as Dt}from"./Tooltip-DaxPnuDE.js";import{G as Gt}from"./grid.styles-beZx-O42.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-Dz891X4r.js";import"./sendMetaTransaction-Dgxdo_cy.js";function D(o){const i=o.source??"item",l=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${l}`}const F="100000000000000000000",We=2,Q=15,qt=/^[a-zA-Z0-9]+$/;function ue(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:qt.test(i)?i.length<We?{ok:!1,reason:"too-short"}:i.length>Q?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,Q)}const Zt=["function available(string _subdomain) view returns (bool)"],ge={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Kt(){return B.chainId===Number(It.ChainId.MATIC_MAINNET)?ge.mainnet:ge.sepolia}async function Jt(o,i={}){var p;const{rpc:l,address:x}=Kt(),c=new Ht(l),d=new Ut(x,Zt,c);console.info(`[names] availability check → DCLRegistrar(${x}).available("${o}") on ${l}`);const h=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${h}`),h?"available":"taken"}const Qt="https://app.across.to/api";class Be extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function Xt(o){return rt(F,o)}async function Yt(o,i,l={}){var p;const x=l.chainId??B.chainId,c=l.provider??"across",d=`${B.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${x}&provider=${c}`,h=await Je(d,{method:"GET",identity:o,metadata:{}});if(!h.ok){let a;try{a=(p=await h.json())==null?void 0:p.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new Be:new Error(`fetchNameCreditRoute ${h.status}`)}return h.json()}function en(o,i){const l=ee.from(o.availableAmount),c=ee.from(F).sub(l);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Bt(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:c.isNegative()?"0":c.toString(),maxCreditedValue:F}}async function tn(o,i={}){const l=Qt,x=i.intervalMs??1e4,c=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let h=0;h<c;h++){try{const p=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const a=await p.json(),u=(a.status??"pending").toLowerCase(),b=a.fillTx??a.fillTxnRef??null,w=a.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:b,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:b,actionsSucceeded:w}}}catch{}h<c-1&&await new Promise(p=>setTimeout(p,x))}return d}async function nn(o){const{name:i,identity:l,signer:x}=o,c=o.chainId??B.chainId,d=o.provider??"across",h=(o.beneficiary??await x.getAddress()).toLowerCase();let p=null,a=!1;console.info("[names] register start",{name:i,buyer:h,chainId:c,provider:d});try{const u=await Ft(c),b=Xt(u);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:u});const w=await Yt(l,i,{chainId:c,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Ze(l,b);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ee.from(j.maxCreditedValue).lt(F))throw new Error("Credit under-sized for the name price");const $=en(j.credit,w);let f;try{f=await At({chainId:c,buyer:h,signer:x,args:$})}catch(y){if(!(y instanceof Nt))throw y;f=await Wt(c,$,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Mt(f),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const y=await tn(f,o.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:f};if(y.status!=="filled"||!y.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:h,originConfirmed:a}),u instanceof Pt)return{status:"pending",originTxHash:u.txHash};if(p&&!a&&await Ke(l,[p]).catch(()=>{}),u instanceof Be)throw u;const b=new Error(Lt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=u,b}}const sn=n.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -366,7 +366,7 @@ import{b as ze,r as m,j as e,u as Ve}from"./react-vyZjIDcS.js";import{c as B,aq
|
|
|
366
366
|
flex: none;
|
|
367
367
|
color: ${t.colors.dclRed};
|
|
368
368
|
}
|
|
369
|
-
`;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
369
|
+
`;function Sn({name:o,priceCredits:i,onClose:l}){const{session:x}=Ie(),{data:c,isError:d}=Qe(x),h=Xe(),p=ze(),[a,u]=m.useState("confirm"),[b,w]=m.useState(""),[j,$]=m.useState(null),f=m.useRef(!1),y=b.trim().toLowerCase()===o.toLowerCase(),v=a==="completing",k=i!=null?Ae(i):"—";m.useEffect(()=>{const g=T=>{T.key==="Escape"&&!v&&l()};document.addEventListener("keydown",g);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=I}},[v,l]);async function C(){if(!(!x||!y||f.current)){f.current=!0,u("completing"),$(null);try{await nn({name:o,identity:x.identity,signer:x.signer}),J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null}),h.invalidateQueries({queryKey:["usd-balance"]}),h.invalidateQueries({queryKey:["my-assets"]}),u("success")}catch(g){J(tt(g)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:et(g),purchase_type:"name"}),$((g==null?void 0:g.message)||s("names.errorGeneric")),u("error")}finally{f.current=!1}}}const z=a!=="success",E=Ye(x==null?void 0:x.providerType);return e.jsx(sn,{onClick:v?void 0:l,role:"presentation",children:e.jsxs(on,{role:"dialog","aria-modal":"true","aria-label":s("names.buyTitle"),onClick:g=>g.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:a==="error"?s("names.errorTitle"):s("names.buyTitle")}),e.jsx(we,{onClick:l,disabled:v,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs($e,{children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(kn,{children:[e.jsx(R,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Te,{onClick:()=>u("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(rn,{children:[e.jsx(an,{children:s("names.confirmTitle")}),e.jsx(ln,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(cn,{children:[e.jsx(dn,{"aria-hidden":!0,children:"@"}),e.jsx(pn,{value:b,onChange:g=>w(g.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(b.length,8)}ch`}}),e.jsx(xn,{children:".dcl.eth"})]})]}),e.jsx(Te,{onClick:()=>void C(),disabled:!y||!x,children:s("names.buyCta")})]})]}),a==="completing"&&e.jsxs(hn,{children:[e.jsx(fn,{src:Ot,alt:"",width:56,height:56}),e.jsx(mn,{children:E?s("names.confirming"):s("names.completing")}),e.jsxs(un,{children:[e.jsx(gn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(bn,{children:"1/1"})]})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(be,{children:[e.jsx(ye,{children:s("names.successHeaderTitle")}),e.jsx(we,{onClick:l,"aria-label":s("buyModal.close"),children:e.jsx(R,{name:"close"})})]}),e.jsxs(je,{children:[s("names.myCreditsBalance")," ",e.jsx(W,{})," ",he(c,d)]}),e.jsx(ve,{}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx(R,{name:"check"})}),e.jsxs(jn,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs($e,{style:{marginTop:20},children:[e.jsx(Ce,{"aria-hidden":!0,children:"@"}),e.jsxs(ke,{children:[e.jsxs(Se,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(Ee,{children:s("names.subtitle")})]}),e.jsxs(Re,{children:[e.jsx(W,{}),k]})]}),e.jsxs(vn,{children:[e.jsx($n,{onClick:()=>{l(),p("/my-assets")},children:s("names.myItems")}),e.jsx(Cn,{href:B.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/governance-DnazlIjy.webp",In=n.div`
|
|
370
370
|
width: 100%;
|
|
371
371
|
min-width: 0;
|
|
372
372
|
`,An=n.nav`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-
|
|
1
|
+
import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-BtM8_SSI.js";import{n as c,T as se}from"./Tooltip-DaxPnuDE.js";import{t as e,s as o,I as g,d as s,n as ae,e as v}from"./index-C9aPSlyC.js";const re=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,L as q,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,w as I,l as B,d as e,m as F,x as W,I as f,y as G,z as K,u as w,D as P,c as Q,E as k,k as H,o as $}from"./index-
|
|
1
|
+
import{j as t,L as q,r as M}from"./react-vyZjIDcS.js";import{s as a,B as N,t as o,w as I,l as B,d as e,m as F,x as W,I as f,y as G,z as K,u as w,D as P,c as Q,E as k,k as H,o as $}from"./index-C9aPSlyC.js";import{a as O,b as _,c as X,d as J,s as U,f as V}from"./authorizations-Dz891X4r.js";import{a as Y}from"./builder-Di_i0uie.js";import{f as Z}from"./errors-JUBkzG87.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Dgxdo_cy.js";const tt=I`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,it=I`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t as ee,s as i,d as a,H as Z,F as Qt,I as R,y as xt,G as ze,l as Kt,ah as q,O as Ze,m as Ut,u as Ot,ai as Ht,D as Vt,aj as Dt,ak as Gt,al as Yt,x as Jt,am as et,an as Q,ao as tt,ap as Xt,k as V,c as at,e as Zt,aq as st,ar as je,as as ke,at as ce,au as nt,g as le,a as ea,C as $e,av as ta}from"./index-
|
|
1
|
+
import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t as ee,s as i,d as a,H as Z,F as Qt,I as R,y as xt,G as ze,l as Kt,ah as q,O as Ze,m as Ut,u as Ot,ai as Ht,D as Vt,aj as Dt,ak as Gt,al as Yt,x as Jt,am as et,an as Q,ao as tt,ap as Xt,k as V,c as at,e as Zt,aq as st,ar as je,as as ke,at as ce,au as nt,g as le,a as ea,C as $e,av as ta}from"./index-C9aPSlyC.js";import{M as aa,S as sa,C as na,H as ia,a as ra,T as oa,X as ca,b as la,B as da,c as ua,d as it,e as ha,f as pe,P as gt,m as mt,g as pa,h as xa,i as ga,j as ft,k as xe,L as ma,l as fa,n as rt,o as ot,W as ya,p as ba,q as va,A as Ca,r as wa,s as ja,t as ka,u as $a,v as Sa,w as Ma,x as Ta,y as Pa,z as za,D as Aa,E as Ia,F as qa,G as Ra,I as _a,J as Ba,K as Se,N as Ea,O as Fa,Q as Wa,R as La,U as ct,V as Na,Y as Qa,Z as Ka,_ as Ua}from"./CollectionCarousel-MJIfHIAG.js";import{u as Oa}from"./useManaRate-BrwJXTcH.js";import{r as Ha}from"./mana-rate-C-S8V8OH.js";import{i as Va,j as Da,f as Ga,n as Ya,h as Ja,A as Xa}from"./authorizations-Dz891X4r.js";import{b as Me}from"./buy-KTMkFDbF.js";import{b as Za,w as es,S as ts,G as as}from"./buy-gasless-Ce5WXr0l.js";import{u as ss,M as ns,R as de,r as is,c as rs}from"./useCreditPacks-BN70ICff.js";import{l as os}from"./loader-logo-BzY9EKdC.js";import{i as cs,a as ls}from"./errors-JUBkzG87.js";import{E as ds}from"./ErrorNotice-T3U1x2gM.js";import{u as lt}from"./mana-convert-519jIoGv.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-BwYos8Ms.js";import"./sendMetaTransaction-Dgxdo_cy.js";const{colors:D,radius:us}=ee,hs=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -58,7 +58,7 @@ import{j as e,L as ge,r as $,b as Lt,a as Nt}from"./react-vyZjIDcS.js";import{t
|
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
color: ${D.text};
|
|
60
60
|
}
|
|
61
|
-
`,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-
|
|
61
|
+
`,fs="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/buy-error-22UunaPC.png";function ys(c){const{phase:d,balanceCredits:k,onClose:T}=c,_=d==="processing",F=d==="error"?a("cartCheckout.errorTitle"):d==="nofunds"?a("cartCheckout.titleNoFunds"):d==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),W=d==="processing";return e.jsxs(aa,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(sa,{onClick:_?void 0:T,"aria-hidden":!0}),e.jsxs(na,{"data-tall":W||void 0,children:[e.jsxs(ia,{children:[e.jsxs(ra,{children:[e.jsx(oa,{children:F}),!_&&e.jsx(ca,{onClick:T,"aria-label":a("buyModal.close"),children:e.jsx(la,{})})]}),e.jsxs(da,{children:[e.jsx(ua,{children:d==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(it,{}),e.jsx(ha,{children:Z(k)})]})]}),d==="choose"&&e.jsxs(pe,{children:[e.jsxs(ms,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(it,{}),Z(c.totalCredits??0)]})]}),e.jsx(gt,{options:c.options??[],totalCents:c.totalCents??0,onPay:c.onPay??(()=>{}),rateNote:(()=>{const z=mt(c.totalCents??0,c.totalManaWei??0n);return z!=null?a("buyModal.manaRate",{mana:z.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),d==="processing"&&e.jsx(bs,{stage:c.stage??"reserving",step:c.step??1,total:c.total??1,isSelfCustody:!!c.isSelfCustody}),d==="nofunds"&&e.jsx(vs,{lines:c.lines??[],shortfallCredits:c.shortfallCredits??0,packs:c.packs??[],selectedPack:c.selectedPack??"",onSelectPack:c.onSelectPack??(()=>{}),onBuyPacks:c.onBuyPacks??(()=>{}),onCancel:T}),d==="error"&&e.jsxs(pe,{children:[e.jsxs(pa,{"data-testid":"buy-error",children:[e.jsx(xa,{src:fs,alt:"",width:64,height:80}),e.jsxs(ga,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:T,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"purple",onClick:c.onRetry??T,children:a("cartCheckout.tryAgain")})]})]})]})]})}function bs({stage:c,step:d,total:k,isSelfCustody:T}){const _=c==="reserving",F=k>0?Math.min(100,Math.round(d/k*100)):0,W=c==="awaiting-signature"?T?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):c==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(pe,{"data-processing":!0,children:[e.jsx(ma,{src:os,alt:"",width:61,height:61}),e.jsx(fa,{children:W}),_?e.jsxs(hs,{children:[e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{"data-step":!0,style:{width:`${F}%`}})}),k>1?e.jsxs(ps,{children:[d,"/",k]}):null]}):e.jsx(rt,{"aria-hidden":!0,children:e.jsx(ot,{})})]})}function vs({lines:c,shortfallCredits:d,packs:k,selectedPack:T,onSelectPack:_,onBuyPacks:F,onCancel:W}){const z=k.find(n=>n.id===T),me=c.reduce((n,I)=>n+(I.quantity??1),0);return e.jsxs(pe,{children:[e.jsxs(ya,{"data-testid":"nofunds-warning",children:[e.jsx(ba,{}),e.jsxs(va,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,d)})})," ",a("buyModal.warningToPurchase",{count:me})]})]}),e.jsx(xs,{children:c.map(n=>{const I=n.quantity??1;return e.jsxs(Ca,{children:[e.jsx(wa,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(ja,{children:[e.jsxs("div",{children:[e.jsxs(ka,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),I>1?e.jsx(gs,{children:a("cartCheckout.qty",{count:I})}):null]}),n.item.creator?e.jsx($a,{address:n.item.creator}):null]}),e.jsxs(Sa,{children:[e.jsx(Ma,{}),e.jsx("span",{children:Z(n.priceCredits*I)})]})]})]},n.item.id)})}),e.jsx(Ta,{children:k.map(n=>{const I=n.id===T;return e.jsxs(Pa,{"data-testid":"credit-pack","data-on":I||void 0,onClick:()=>_(n.id),children:[e.jsx(za,{}),e.jsx(Aa,{children:Z(n.credits)}),e.jsxs(Ia,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(qa,{children:[e.jsxs(Ra,{children:[e.jsx(_a,{}),e.jsx("span",{children:Z((z==null?void 0:z.credits)??0)})]}),e.jsxs(Ba,{children:["$",((z==null?void 0:z.usd)??0).toFixed(2)]})]}),e.jsxs(ft,{children:[e.jsx(xe,{"data-variant":"outline",onClick:W,children:a("buyModal.cancel")}),e.jsx(xe,{"data-variant":"gradient",onClick:F,children:a("buyModal.buy")})]})]})}const{colors:o,gradients:yt,radius:K}=ee,bt="@media (max-width: 1080px)",S="@media (max-width: 880px)",dt=i.div`
|
|
62
62
|
max-width: 1510px;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-
|
|
1
|
+
import{K as N,L as w,M as o,N as n,G as D,w as M}from"./index-C9aPSlyC.js";import{r as U,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as K,s as v}from"./clsx-DZSbGRZP.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const G=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,L=M(P||(P=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ad as J,ae as z,I as X,d as a,c as ee,k as te,u as ae,l as re,e as oe,S as E,A as ie,af as se,ag as ne}from"./index-
|
|
1
|
+
import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ad as J,ae as z,I as X,d as a,c as ee,k as te,u as ae,l as re,e as oe,S as E,A as ie,af as se,ag as ne}from"./index-C9aPSlyC.js";import{E as ce}from"./ErrorNotice-T3U1x2gM.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-Cyml9DBN.js";import{u as ve}from"./useStore-BmRyRgKo.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-BtM8_SSI.js";import{L as $e}from"./LoadMore-EzzDujll.js";import{u as Pe}from"./useInfiniteGrid-_0aqBjgd.js";import{G as Me}from"./grid.styles-beZx-O42.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const Re=c.section`
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: ${v.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,d as g,y as k,H as j,b8 as C,e as G,w as Y,I as Q,k as X,g as W,C as B,a as Z,b9 as J,ba as F,A as q}from"./index-
|
|
1
|
+
import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,d as g,y as k,H as j,b8 as C,e as G,w as Y,I as Q,k as X,g as W,C as B,a as Z,b9 as J,ba as F,A as q}from"./index-C9aPSlyC.js";import{s as ee,h as H,A as U,g as K,r as te,m as ne,e as ae}from"./authorizations-Dz891X4r.js";import{i as ie}from"./errors-JUBkzG87.js";import{E as oe}from"./ErrorNotice-T3U1x2gM.js";import{a as se}from"./buy-KTMkFDbF.js";import{d as re,f as ce}from"./trade-encoding-BwYos8Ms.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-Dgxdo_cy.js";import{I as he,C as ue}from"./ethers-CpLYx0ea.js";const L="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(L,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(a){let n;try{n=sessionStorage.getItem(L)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(L)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var m,f,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,s=a.priceManaWei>0n?a.priceManaWei:0n,d=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),s>0n&&i>0&&i<n){const l=n-i,b=fe(l,n,s);d>=b&&c.push({method:"combined",creditsCents:i,manaWei:b})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((m=c.find(l=>l.method==="credits"))==null?void 0:m.method)??((f=c.find(l=>l.method==="combined"))==null?void 0:f.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,y=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:y}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",be=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,aw as we,ax as R,ay as _,s as a,az as je,F as ve,aA as Ce,d as t,aB as W,B as ye,G as q,ad as J,m as $e,ae as Q,I as T,c as ke,l as Ne,S,e as Pe,A as Se,av as Le,aC as Ae}from"./index-
|
|
1
|
+
import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as Z,aw as we,ax as R,ay as _,s as a,az as je,F as ve,aA as Ce,d as t,aB as W,B as ye,G as q,ad as J,m as $e,ae as Q,I as T,c as ke,l as Ne,S,e as Pe,A as Se,av as Le,aC as Ae}from"./index-C9aPSlyC.js";import{d as Me,g as ze,a as Fe,P as Be,C as Ee,b as Ie,c as Re,A as _e,B as We,S as Te,M as Ge,e as He,f as Ue}from"./browseLayout.styles-Cyml9DBN.js";import{u as De,L as Ke}from"./useStore-BmRyRgKo.js";import{c as G,a as Oe,F as Ve,d as Ye,P as Ze,e as qe,H as Je,S as Qe}from"./categories-BtM8_SSI.js";import{L as H}from"./LoadMore-EzzDujll.js";import{u as U}from"./useInfiniteGrid-_0aqBjgd.js";import{E as D}from"./ErrorNotice-T3U1x2gM.js";import{G as K}from"./grid.styles-beZx-O42.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";const{colors:m,radius:X,media:Xe}=Z,et=a.article`
|
|
2
2
|
height: 300px;
|
|
3
3
|
background: ${m.bg};
|
|
4
4
|
border-radius: ${X.card};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-C9aPSlyC.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-
|
|
1
|
+
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-CRyphTNj.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-Jvvdliqx.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aM as me}from"./index-
|
|
1
|
+
import{b as pe,u as xe,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aM as me}from"./index-C9aPSlyC.js";import{R as N}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce}from"./useCreditPacks-BN70ICff.js";import{l as H}from"./loader-logo-BzY9EKdC.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./mana-convert-519jIoGv.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/pack-coins-BDh1ZDbh.webp",ie="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/pack-stacks-D-V2jSHW.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/credit-coin-CmcTCd5i.webp",$e="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",ve="https://cdn.decentraland.org/@dcl/shop/0.1.0-30497598696.commit-4ea1dde/assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Se=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-
|
|
1
|
+
import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-BiUDBy6C.js";import{d as g,r as v}from"./index-Jvvdliqx.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-CRyphTNj.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,w as ie,x as se,d as i,e as
|
|
1
|
+
import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,w as ie,x as se,d as i,e as R,B as L,y as z,an as ne,aL as K,k as W,l as re,m as oe,D as ae,u as de,E as ce}from"./index-C9aPSlyC.js";import{i as le,R as pe,f as ge}from"./import-4RvqLrjt.js";import{u as xe}from"./useSecondarySales-zW-UzRs8.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CpLYx0ea.js";import"./intl-CBcMB1D2.js";import"./buy-KTMkFDbF.js";import"./authorizations-Dz891X4r.js";import"./sendMetaTransaction-Dgxdo_cy.js";import"./trade-encoding-BwYos8Ms.js";import"./mana-rate-C-S8V8OH.js";import"./mana-convert-519jIoGv.js";function U({size:o=12,...w}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...w,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:M,radius:me,z:ue}=S,he=ie`
|
|
2
2
|
0% {
|
|
3
3
|
transform: scale(0);
|
|
4
4
|
opacity: 0;
|
|
@@ -11,15 +11,21 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
11
11
|
position: fixed;
|
|
12
12
|
inset: 0;
|
|
13
13
|
background: rgba(0, 0, 0, 0.5);
|
|
14
|
-
display:
|
|
15
|
-
|
|
14
|
+
display: flex;
|
|
15
|
+
overflow-y: auto;
|
|
16
|
+
padding: 20px;
|
|
16
17
|
// Above the global DCL navbar so the backdrop dims the full viewport (navbar included).
|
|
17
18
|
z-index: ${ue.overlay};
|
|
18
19
|
`,Z=t.div`
|
|
19
|
-
background: ${
|
|
20
|
+
background: ${M.white};
|
|
20
21
|
border-radius: ${me.card};
|
|
21
22
|
padding: 24px;
|
|
22
23
|
width: min(420px, 92vw);
|
|
24
|
+
margin: auto;
|
|
25
|
+
/* Never taller than the (padded) viewport, and scroll inside if the content still does not fit — on a
|
|
26
|
+
short screen the actions used to sit off the bottom edge with no way to reach them. */
|
|
27
|
+
max-height: 100%;
|
|
28
|
+
overflow-y: auto;
|
|
23
29
|
display: flex;
|
|
24
30
|
flex-direction: column;
|
|
25
31
|
gap: 12px;
|
|
@@ -39,19 +45,23 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
39
45
|
height: 140px;
|
|
40
46
|
object-fit: contain;
|
|
41
47
|
align-self: center;
|
|
42
|
-
background: ${
|
|
48
|
+
background: ${M.media};
|
|
43
49
|
border-radius: 10px;
|
|
44
50
|
`;const fe=t.div`
|
|
51
|
+
position: sticky;
|
|
52
|
+
bottom: 0;
|
|
45
53
|
display: flex;
|
|
46
54
|
justify-content: flex-end;
|
|
47
55
|
gap: 10px;
|
|
48
56
|
margin-top: 6px;
|
|
57
|
+
padding-top: 8px;
|
|
58
|
+
background: ${M.white};
|
|
49
59
|
`,be=t.div`
|
|
50
60
|
width: 56px;
|
|
51
61
|
height: 56px;
|
|
52
62
|
border-radius: 50%;
|
|
53
|
-
background: ${
|
|
54
|
-
color: ${
|
|
63
|
+
background: ${M.okStrong};
|
|
64
|
+
color: ${M.white};
|
|
55
65
|
font-size: 30px;
|
|
56
66
|
font-weight: 800;
|
|
57
67
|
display: grid;
|
|
@@ -66,17 +76,17 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
66
76
|
font-weight: 700;
|
|
67
77
|
font-size: 16px;
|
|
68
78
|
margin: 2px 0 0;
|
|
69
|
-
`;const{colors:y,gradients:ye,radius:
|
|
79
|
+
`;const{colors:y,gradients:ye,radius:we}=S,je=t(Z)`
|
|
70
80
|
width: min(460px, 94vw);
|
|
71
81
|
text-align: left;
|
|
72
82
|
align-items: stretch;
|
|
73
|
-
`,
|
|
83
|
+
`,ve=t.div`
|
|
74
84
|
height: 6px;
|
|
75
85
|
border-radius: 999px;
|
|
76
86
|
background: ${y.line};
|
|
77
87
|
overflow: hidden;
|
|
78
88
|
margin: 6px 0 14px;
|
|
79
|
-
`,
|
|
89
|
+
`,ke=t.div`
|
|
80
90
|
height: 100%;
|
|
81
91
|
width: 0;
|
|
82
92
|
background: ${ye.amethyst};
|
|
@@ -89,6 +99,10 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
89
99
|
display: flex;
|
|
90
100
|
flex-direction: column;
|
|
91
101
|
gap: 8px;
|
|
102
|
+
/* The elastic part of a viewport-capped modal: it gives up height before anything else. The floor is
|
|
103
|
+
explicit because a scroll container's automatic minimum size is zero — it would otherwise collapse
|
|
104
|
+
to nothing on a short screen instead of just showing fewer rows. */
|
|
105
|
+
min-height: 96px;
|
|
92
106
|
max-height: 320px;
|
|
93
107
|
overflow-y: auto;
|
|
94
108
|
`,Se=t.li`
|
|
@@ -113,7 +127,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
113
127
|
`,Le=t.span`
|
|
114
128
|
width: 34px;
|
|
115
129
|
height: 34px;
|
|
116
|
-
border-radius: ${
|
|
130
|
+
border-radius: ${we.btn};
|
|
117
131
|
overflow: hidden;
|
|
118
132
|
background: ${y.media};
|
|
119
133
|
display: grid;
|
|
@@ -165,7 +179,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
165
179
|
font-size: 12px;
|
|
166
180
|
`,Ne=t.p`
|
|
167
181
|
margin: 12px 0 0;
|
|
168
|
-
`;function Be({queue:o,session:
|
|
182
|
+
`;function Be({queue:o,session:w,onClose:j,onDone:m}){const v=ee(),p=se(w.providerType),[g,b]=h.useState(()=>o.map(()=>"pending")),[A,Q]=h.useState("running"),k=h.useRef(!1);h.useEffect(()=>{if(k.current)return;k.current=!0;let n=!1;return(async()=>{for(let a=0;a<o.length;a++){if(n)return;b(x=>x.map((u,f)=>f===a?"active":u));try{await le(o[a].item,o[a].priceCredits,w),ne("Shop Migrated Listing",{item_id:o[a].item.itemId??o[a].item.oldTradeId??null,contract_address:o[a].item.contractAddress,new_price_credits:o[a].priceCredits,new_price_usd:K(o[a].priceCredits)}),n||b(x=>x.map((u,f)=>f===a?"done":u))}catch(x){if(x instanceof pe)W(x,{flow:"import_listing",step:"relist",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(u=>u.map((f,C)=>C===a?"unlisted":f));else{const u=x,f=u.code===4001||/reject|denied|cancel/i.test(u.message??"");f||W(x,{flow:"import_listing",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(C=>C.map((B,P)=>P===a?f?"skipped":"failed":B))}}}n||Q("finished")})(),()=>{n=!0}},[]);const $=g.filter(n=>n==="done").length,E=g.findIndex(n=>n==="active"),N=Math.round(g.filter(n=>n!=="pending"&&n!=="active").length/o.length*100);function I(){m(),j()}if(A==="finished"){const n=g.filter(a=>a==="skipped"||a==="failed").length,l=g.filter(a=>a==="unlisted").length;return e.jsx(H,{role:"presentation",children:e.jsxs(Z,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(be,{"aria-hidden":!0,children:e.jsx(U,{size:30})}),e.jsx(O,{children:$>0?i("migrate.successTitle"):i("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[$>0?i("migrate.listedSummary",{count:$,currency:R.name}):i("migrate.noneListed"),n>0?" "+i("migrate.skippedSummary",{count:n}):"",l>0?" "+i("migrate.unlistedSummary",{count:l}):""]}),e.jsxs(fe,{"data-actions":!0,children:[e.jsx(L,{variant:"ghost",onClick:I,children:i("getCredits.done")}),l>0?e.jsx(L,{variant:"purple",onClick:()=>{m(),j(),v("/my-assets")},children:i("migrate.goToMyAssets")}):$>0?e.jsx(L,{variant:"purple",onClick:()=>{m(),j(),v("/assets")},children:i("migrate.viewInShop")}):null]})]})})}return e.jsx(H,{role:"presentation",children:e.jsxs(je,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[p?i("migrate.subConfirm"):i("migrate.subManaged")," ",E>=0?i("migrate.progressCount",{current:E+1,total:o.length}):""]}),e.jsx(ve,{children:e.jsx(ke,{style:{width:`${N}%`}})}),e.jsx($e,{children:o.map((n,l)=>e.jsxs(Se,{"data-status":g[l],children:[e.jsx(Le,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsx(Ie,{title:n.item.name,children:n.item.name||i("migrate.itemFallback")}),e.jsxs(Ce,{children:[e.jsx(z,{className:"ccy-mark"})," ",n.priceCredits.toLocaleString()]}),e.jsx(Te,{children:g[l]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"spinner","aria-hidden":!0})," ",p?i("migrate.statusConfirm"):i("migrate.statusAdding")]}):g[l]==="done"?e.jsx(Ee,{children:e.jsx(U,{})}):g[l]==="skipped"?e.jsx(_,{children:i("migrate.statusSkipped")}):g[l]==="failed"?e.jsx(_,{children:i("migrate.statusFailed")}):g[l]==="unlisted"?e.jsx(_,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(ze,{children:i("migrate.statusWaiting")})})]},n.item.oldTradeId))}),e.jsx(Ne,{className:"muted small",children:p?i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const{colors:r,gradients:Re,radius:Ae}=S,D="@media (max-width: 620px)",G=t.div`
|
|
169
183
|
max-width: 520px;
|
|
170
184
|
margin: 0 auto;
|
|
171
185
|
text-align: center;
|
|
@@ -430,4 +444,4 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
|
|
|
430
444
|
flex: 1 1 auto;
|
|
431
445
|
`,xt=t(L)`
|
|
432
446
|
padding: 13px 24px;
|
|
433
|
-
`,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:
|
|
447
|
+
`,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:w,restore:j}=oe(),m=ae(),v=o==null?void 0:o.address;h.useEffect(()=>{j()},[j]);const{data:p,isLoading:g}=de({queryKey:["importable",v],queryFn:()=>ge(v),enabled:!!v}),b=xe(),A=h.useMemo(()=>mt.filter(d=>!d.secondary||b),[b]),[Q,k]=h.useState({}),[$,E]=h.useState(new Set),[N,I]=h.useState(null),n=h.useMemo(()=>[...(p==null?void 0:p.creations)??[],...b?(p==null?void 0:p.owned)??[]:[]],[p,b]);h.useEffect(()=>{n.length&&k(d=>{const c={...d};for(const s of n)c[s.oldTradeId]==null&&(c[s.oldTradeId]=s.suggestedCredits);return c})},[n]);const l=d=>!$.has(d),a=d=>Q[d.oldTradeId]??d.suggestedCredits,x=n.filter(d=>l(d.oldTradeId)),u=x.reduce((d,c)=>d+a(c),0);function f(d,c){const s=c.replace(/[^\d]/g,"");k(T=>({...T,[d]:s===""?0:parseInt(s,10)}))}function C(d){E(c=>{const s=new Set(c);return s.has(d)?s.delete(d):s.add(d),s})}function B(d){return d.map(c=>({item:c,priceCredits:Math.max(1,a(c))}))}function P(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(i("importListings.toastUpdated"))}return o?!g&&n.length===0?e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"✨"}),e.jsx(J,{children:i("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:i("importListings.emptyBody")}),e.jsx(V,{as:te,to:"/my-assets",variant:"purple",children:i("importListings.goToMyAssets")})]}):e.jsxs(Qe,{children:[e.jsxs(Pe,{children:[e.jsx(Fe,{children:i("importListings.eyebrow")}),e.jsxs(_e,{children:[i("importListings.titleLead")," ",e.jsx(Ke,{children:i("importListings.titleAccent")})]}),e.jsx(De,{children:i("importListings.lede",{currency:R.name})})]}),e.jsxs(We,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",i("importListings.rate",{currency:R.nameSingular})]}),g?e.jsx(X,{children:Array.from({length:4}).map((d,c)=>e.jsx(Je,{},c))}):A.map(d=>{const c=(p==null?void 0:p[d.key])??[];return c.length===0?null:e.jsxs(Ue,{children:[e.jsxs(He,{children:[e.jsx(Oe,{children:i(d.title)}),e.jsx(Ge,{children:i(d.sub)})]}),e.jsx(X,{children:c.map(s=>{const T=a(s),q=T!==s.suggestedCredits;return e.jsxs(Ye,{"data-off":l(s.oldTradeId)?void 0:!0,children:[e.jsx(Ve,{type:"checkbox",checked:l(s.oldTradeId),onChange:()=>C(s.oldTradeId),"aria-label":i("importListings.includeItem",{name:s.name})}),e.jsx(Xe,{children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs(Ze,{children:[e.jsx(qe,{title:s.name,children:s.name||i("importListings.itemFallback")}),e.jsx(et,{children:s.rarity})]}),e.jsxs(tt,{children:[e.jsxs(it,{children:[e.jsx(z,{size:15,color:S.colors.text}),e.jsx(st,{"data-testid":"imp-price-input",inputMode:"numeric",value:T.toLocaleString(),onChange:F=>f(s.oldTradeId,F.target.value),"aria-label":i("importListings.priceAria",{currency:R.name,name:s.name})})]}),e.jsxs(nt,{children:[e.jsxs("span",{children:["$",K(T).toFixed(2)]}),q?e.jsxs(rt,{onClick:()=>k(F=>({...F,[s.oldTradeId]:s.suggestedCredits})),children:[i("importListings.resetTo")," ",e.jsx(z,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx(ot,{children:e.jsx(at,{size:"sm",disabled:!l(s.oldTradeId),onClick:()=>I(B([s])),children:i("importListings.list")})})]},s.oldTradeId)})})]},d.key)}),e.jsx(dt,{children:e.jsxs(ct,{children:[e.jsxs("div",{children:[e.jsxs(lt,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",u.toLocaleString()]}),e.jsx(pt,{children:i("importListings.selectedSummary",{count:x.length,usd:K(u).toFixed(2)})})]}),e.jsx(gt,{}),e.jsx(xt,{variant:"purple",disabled:x.length===0,onClick:()=>I(B(x)),children:i("importListings.listAll",{count:x.length})})]})}),N&&o?e.jsx(Be,{queue:N,session:o,onClose:()=>I(null),onDone:P}):null]}):e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"📦"}),e.jsx(J,{children:i("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:i("importListings.signInBody")}),e.jsx(V,{variant:"purple",onClick:()=>w(),children:i("storeSettings.signIn")})]})}export{Tt as ImportListings};
|