PageSourceSearch

https://www.kasware.xyz/assets/CrossChainPage-dgBizpJe.js

js kasware.xyz collected 2026-10-02 11:58:33 UTC 21,928 bytes, 2 lines download raw bytes

1import{r as s,j as e,P as st,p as Le,o as ce,n as F,m as X,Q as Y,l as O,T as at,v as De,U as rt}from"./react-vendor-LIzmJNoi.js";import{l as de,m as nt,n as lt,C as N,o as it,p as ot,d as xe,q as ct,r as dt,u as xt,s as ht,v as mt,w as gt,x as ut,y as We,z as he,A as bt,S as pt}from"./SwapHistory-2jE50ZBi.js";import{u as ft,c as P}from"./useWalletClient-Is7rTdkM.js";import{K as yt}from"./KaspaNetworkNotice-0QamvlmQ.js";import{v as jt}from"./validation-CxjDadsu.js";import"./vendor-B3oGhpB_.js";import"./particles-DHoM9QnK.js";import"./format-D09g1TZ1.js";const Oe=N.filter(x=>P(x.chain)!==null);function Ue(x){const u=N.find(r=>r.ticker===x);if(!u)throw new Error(`Unknown cross-chain asset: ${x}`);return u}const Nt=Ue("kas"),vt=Ue("ton"),Pe=1e4,kt=6e4,wt=15e3,Ct=3,Me=30*60*1e3;function Lt(){var _e;const[x,u]=s.useState("configure"),[r,J]=s.useState(Nt),[n,Z]=s.useState(vt),[c,me]=s.useState(""),[d,M]=s.useState(""),[I,R]=s.useState([]),[b,C]=s.useState(null),[ee,ge]=s.useState(!1),[ue,U]=s.useState(null),[Ke,te]=s.useState(!1),[l,se]=s.useState(null),[_,K]=s.useState(null),[be,pe]=s.useState(!1),[fe,S]=s.useState(null),[$,v]=s.useState(null),[$e,ye]=s.useState(!1),[je,Ne]=s.useState(!1),[ve,Q]=s.useState(null),[ae,re]=s.useState(null),L=s.useRef(null),A=s.useRef(null),q=s.useRef(0),{connected:k,connecting:ke,isIframe:we,extensionAvailable:Qe,client:z,addresses:o,connect:qe,connectTon:ne,tonConnecting:le,connectEvm:ie,evmConnecting:oe,refreshAddresses:Ce}=ft(),[Se,E]=s.useState(!1),h=s.useMemo(()=>P(n.chain),[n.chain]),p=h?o[h]:null,Ae=!!p&&d===p,ze=k&&!p&&(h==="ton"||h==="evm");s.useEffect(()=>{Se||M(p??"")},[p,Se]);const Be=s.useCallback(()=>{p&&(M(p),E(!1))},[p]),He=s.useCallback(t=>{M(t.target.value),E(!0)},[]),Ee=P(n.chain)!==null,Ge=s.useCallback(()=>{P(n.chain)!==null&&(J(n),Z(r),R([]),C(null),U(null),E(!1))},[r,n]),f=s.useCallback(()=>{q.current+=1,L.current&&clearTimeout(L.current),L.current=null,A.current&&A.current.abort(),A.current=null},[]);s.useEffect(()=>()=>f(),[f]);const B=s.useCallback(t=>{f();const a=q.current,i=t.createdAt+Me,m=()=>{f(),v("Stopped tracking this exchange after 30 minutes. Check its status on the provider’s site.")};if(Date.now()>=i){m();return}const g=de(t.provider,t.exchangeId),y=t.provider==="letsexchange"?nt:lt;let j=t.status,W=0;const G=async()=>{const V=new AbortController;A.current=V;const et=setTimeout(()=>V.abort(),wt);try{const T=await y(t.exchangeId,V.signal);if(q.current!==a)return;if(W=0,v(null),T!==j&&(j=T,K(T),We(g,{status:T})),T==="completed"||T==="failed"){f(),u("track");return}}catch{if(q.current!==a)return;W+=1,W>=Ct&&v("Cannot reach the provider for a status update right now — still retrying.")}finally{clearTimeout(et),A.current===V&&(A.current=null)}if(Date.now()>=i){m();return}const tt=Math.min(Pe*2**Math.min(W,3),kt);L.current=setTimeout(G,tt)};L.current=setTimeout(G,Pe)},[f]),H=s.useCallback(t=>!t.exchangeId||!t.depositAddress?"This record is missing its exchange id or deposit address and cannot be reopened here.":N.some(a=>a.ticker===t.from.ticker)?N.some(a=>a.ticker===t.to.ticker)?null:`${t.to.symbol} is no longer offered here. Track this exchange on the provider’s site.`:`${t.from.symbol} is no longer offered here. Track this exchange on the provider’s site.`,[]),Te=s.useCallback(t=>{const a=H(t);if(a){S(a);return}const i=N.find(y=>y.ticker===t.from.ticker),m=N.find(y=>y.ticker===t.to.ticker);
1if(!i||!m||!t.exchangeId||!t.depositAddress)return;const g={provider:t.provider,exchangeId:t.exchangeId,depositAddress:t.depositAddress,depositAmount:t.depositAmount??t.fromAmount,depositExtraId:t.depositExtraId,status:t.status==="submitted"?"waiting":t.status,createdAt:t.createdAt};J(i),Z(m),me(t.fromAmount),M(t.toAddress??""),E(!0),se(g),K(g.status),re(t.depositRef??null),u(t.depositRef?"track":"deposit"),S(null),v(null),Q(null),B(g)},[H,B]);s.useEffect(()=>{const t=it(Me);t&&!H(t)&&Te(t)},[]);const Fe=s.useCallback(async()=>{if(!(!c||parseFloat(c)<=0||!d)){ge(!0),U(null),te(!1),R([]),C(null);try{const t=await ot({fromAsset:{symbol:r.symbol,chain:r.chain,decimals:r.decimals,ticker:r.ticker,network:r.network,coinCode:r.coinCode},toAsset:{symbol:n.symbol,chain:n.chain,decimals:n.decimals,ticker:n.ticker,network:n.network,coinCode:n.coinCode},fromAmount:c});t.length===0?(U("No exchange provider is available right now."),te(!0)):(R(t.map(a=>({provider:a.provider,quote:a}))),C(t[0].provider))}catch(t){U(xe(t,"Failed to fetch quotes")),te(ct(t))}ge(!1)}},[r,n,c,d]);s.useEffect(()=>{if(x!=="configure")return;if(!c||parseFloat(c)<=0||!d){R([]),C(null);return}const t=setTimeout(()=>{Fe()},500);return()=>clearTimeout(t)},[c,d,r,n,x]);const Ve=s.useCallback(async()=>{var t;if(b){if(n.chain==="kaspa"){const{valid:a,error:i}=jt(d);if(!a){S(i??"Enter a valid Kaspa mainnet address");return}}pe(!0),S(null);try{const a=r.symbol,i=n.symbol,m=b==="letsexchange"?r.network:r.chain,g=b==="letsexchange"?n.network:n.chain,y={fromSymbol:a,toSymbol:i,fromAmount:c,toAddress:d,fromNetwork:m,toNetwork:g,fromCoinCode:r.coinCode,toCoinCode:n.coinCode,fromDecimals:r.decimals},j=b==="letsexchange"?await dt(y):await xt(y);se(j),K(j.status),u("deposit"),ht(mt({exchange:j,from:{symbol:r.symbol,chain:r.chain,ticker:r.ticker},to:{symbol:n.symbol,chain:n.chain,ticker:n.ticker},fromAmount:c,toAmount:((t=I.find(G=>G.provider===b))==null?void 0:t.quote.toAmount)??"",toAddress:d}))||v(`Could not save this exchange on this device — note the ID ${j.exchangeId} and the deposit address below before reloading.`),B(j)}catch(a){S(xe(a,"Failed to create exchange"))}finally{pe(!1)}}},[b,r,n,c,d,I,B]),Xe=s.useCallback(async()=>{if(l)try{await navigator.clipboard.writeText(l.depositAddress),ye(!0),setTimeout(()=>ye(!1),2e3)}catch{v("Could not copy automatically — please copy the deposit address manually.")}},[l]),w=s.useMemo(()=>P(r.chain),[r.chain]),Ye=!!z&&gt(r,l==null?void 0:l.depositExtraId),Je=s.useCallback(async()=>{if(!(!l||!z)){Ne(!0),Q(null);try{let t=w?o[w]:null;!t&&w==="ton"&&(t=await ne()),!t&&w==="evm"&&(t=await ie());const a=await ut({client:z,asset:r,toAddress:l.depositAddress,amount:l.depositAmount,memo:l.depositExtraId,fromAddress:t??void 0});re(a),We(de(l.provider,l.exchangeId),{depositRef:a}),u("track")}catch(t){Q(xe(t,"Failed to send the deposit"))}finally{Ne(!1),Ce()}}},[l,z,r,w,o,ne,ie,Ce]),Ie=s.useCallback(()=>{f(),se(null),K(null),u("configure"),R([]),C(null),S(null),Q(null),v(null),re(null),E(!1)},[f]),Ze=!k&&!we&&!Qe,D=[{key:"waiting",label:he.waiting},{key:"processing",label:he.processing},{key:"completed",label:he.completed}],Re=_==="failed"?-1:D.findIndex(t=>t.key===_);return e.jsx("div",{className:"min-h-screen pt-24 pb-16 px-4",children:e.jsxs("div",{className:"max-w-lg mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[x!=="configure"&&e.jsx("button",{onClick:Ie,className:"text-gray-400 hover:text-white light:hover:text-gray-900 transition-colors",children:e.jsx(st,{})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-3xl font-bold text-white light:text-gray-900",children:"Cross-chain Exchange"}),e.jsx("p",{className:"text-gray-400 light:text-gray-600 text-sm",children:"Swap across chains via LetsExchange & ChangeNOW"})]})]}),Ze&&e.jsxs("div",{className:"surface-card p-6 mb-6 text-center",children:[e.jsx(Le,{className:"text-brand text-3xl mx-auto mb-3"}),e.jsx("h3",{className:"text-white light:text-gray-900 font-semibold mb-2",children:"Connect KasWare Wallet"}),e.jsx("p",{className:"text-gray-400 light:text-gray-500 text-sm mb-4",children:"Install the KasWare Chrome extension to auto-fill your receiving addresses."}),e.jsxs("a",{href:"https://chrome.google.com/webstore",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light transition-colors",children:[e.jsx(ce,{})," Install KasWare Extension"]})]}),!k&&we&&e.jsxs("div",{className:"surface-card p-6 mb-6 text-center",children:[e.jsx(Le,{className:"text-brand text-3xl mx-auto mb-3"}),e.jsx("h3",{className:"text-white light:text-gray-900 font-semibold mb-2",children:"Wallet disconnected"}),e.jsx("p",{className:"text-gray-400 light:text-gray-500 text-sm mb-4",children:"Reconnect to auto-fill your receiving address and send the deposit from the wallet."}),e.jsx("button",{onClick:qe,disabled:ke,className:"inline-flex items-center gap-2 px-6 py-2.5 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:ke?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"animate-spin"})," Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{})," Connect wallet"]})})]}),k&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-brand bg-brand/10 border border-brand/30 rounded-xl px-3 py-2 mb-4",children:[e.jsx(X,{}),o.ton&&e.jsxs("span",{children:["TON: ",o.ton.slice(0,6),"...",o.ton.slice(-4)]}),o.kaspa&&e.jsxs("span",{children:["KAS: ",o.kaspa.slice(0,8),"..."]}),o.evm&&e.jsxs("span",{children:["EVM: ",o.evm.slice(0,6),"...",o.evm.slice(-4)]}),!o.ton&&!o.kaspa&&!o.evm&&e.jsx("span",{className:"text-gray-400",children:"No addresses available"})]}),x==="configure"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"surface-card p-4 mb-2",children:[e.jsx("label",{className:"text-xs text-gray-400 light:text-gray-500 mb-1 block",children:"Send"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("select",{value:r.ticker,onChange:t=>{const a=Oe.find(i=>i.ticker===t.target.value);a&&J(a)},className:"bg-white/5 light:bg-gray-100 border border-white/10 light:border-gray-300 rounded-xl px-3 py-2 text-white light:text-gray-900 text-sm focus:outline-none focus:border-brand",children:Oe.map(t=>e.jsx("option",{value:t.ticker,className:"bg-dark-bg text-white",children:t.symbol},t.ticker))}),e.jsx("input",{type:"number",value:c,onChange:t=>me(t.target.value),placeholder:"0.0",min:"0",step:"any",className:"flex-1 bg-transparent text-right text-xl text-white light:text-gray-900 focus:outline-none placeholder-gray-500"})]})]}),e.jsx("div",{className:"flex justify-center -my-3 relative z-10",children:e.jsx("button",{onClick:Ge,disabled:!Ee,className:"bg-dark-bg-light light:bg-gray-200 border border-white/10 light:border-gray-300 rounded-full p-2 hover:bg-brand/20 disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":"Swap direction",title:Ee?"Swap direction":`KasWare cannot send from ${n.chain}, so it cannot become the send asset`,children:e.jsx(Y,{className:"text-brand rotate-90"})})}),e.jsxs("div",{className:"surface-card p-4 mb-4",children:[e.jsx("label",{className:"text-xs text-gray-400 light:text-gray-500 mb-1 block",children:"Receive"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("select",{value:n.ticker,onChange:t=>{const a=N.find(i=>i.ticker===t.target.value);a&&(Z(a),E(!1))},className:"bg-white/5 light:bg-gray-100 border border-white/10 light:border-gray-300 rounded-xl px-3 py-2 text-white light:text-gray-900 text-sm focus:outline-none focus:border-brand",children:N.map(t=>e.jsx("option",{value:t.ticker,className:"bg-dark-bg text-white",children:t.symbol},t.ticker))}),e.jsx("div",{className:"flex-1 text-right text-xl text-gray-400 light:text-gray-500",children:ee?"...":((_e=I.find(t=>t.provider===b))==null?void 0:_e.quote.toAmount)??"—"})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{className:"text-xs text-gray-400 light:text-gray-500 mb-1 block",children:["Your receiving address (",n.symbol,")",Ae&&e.jsx("span",{className:"text-brand ml-1",children:"(auto-filled)"})]}),e.jsxs("div",{className:"flex items-stretch gap-2",children:[e.jsx("input",{type:"text",value:d,onChange:He,placeholder:k?h?"Auto-filled from wallet":`Enter your ${n.chain} address`:`Enter your ${n.chain} address`,className:"flex-1 min-w-0 bg-surface-card border border-white/10 light:border-gray-200 rounded-xl px-4 py-2.5 text-sm text-white light:text-gray-900 focus:outline-none focus:border-brand placeholder-gray-500"}),k&&h&&p&&!Ae&&e.jsx("button",{type:"button",onClick:Be,className:"shrink-0 px-3 rounded-xl text-xs font-medium text-brand border border-brand/40 bg-brand/10 hover:bg-brand/20 transition-colors",title:"Fill with the address managed by your wallet",children:"Use wallet"})]}),k&&!d&&!h&&e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"This chain is not managed by 
1KasWare. Please enter the address manually."}),ze&&e.jsx("button",{type:"button",onClick:h==="ton"?ne:ie,disabled:h==="ton"?le:oe,className:"mt-2 w-full py-2 rounded-xl text-xs font-semibold text-dark-bg bg-brand hover:bg-brand-light disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",children:(h==="ton"?le:oe)?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"animate-spin"})," Connecting ",n.chain,"..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ce,{})," Connect ",n.chain," to auto-fill"]})})]}),e.jsx("button",{onClick:Fe,disabled:!c||parseFloat(c)<=0||!d||ee,className:"w-full py-3 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2 mb-4",children:ee?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"animate-spin"})," Fetching quotes..."]}):"Get Quotes"}),I.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h3",{className:"text-xs text-gray-400 light:text-gray-500 mb-2",children:"Select provider"}),e.jsx("div",{className:"space-y-2",children:I.map(({provider:t,quote:a})=>e.jsxs("button",{onClick:()=>C(t),className:`w-full flex items-center justify-between p-3 rounded-xl border transition-colors ${b===t?"border-brand bg-brand/10":"border-white/10 light:border-gray-200 bg-surface-card hover:border-brand/30"}`,children:[e.jsx("span",{className:"text-sm text-white light:text-gray-900 font-medium capitalize",children:t==="letsexchange"?"LetsExchange":"ChangeNOW"}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"text-sm text-white light:text-gray-900",children:[a.toAmount," ",n.symbol]}),a.estimatedTime&&e.jsxs("div",{className:"text-xs text-gray-400",children:["~",Math.round(a.estimatedTime/60)," min"]})]})]},t))}),e.jsx("button",{onClick:Ve,disabled:!b||be,className:"w-full mt-4 py-3 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",children:be?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"animate-spin"})," Creating exchange..."]}):e.jsxs(e.Fragment,{children:["Start Exchange ",e.jsx(Y,{})]})})]}),(ue||fe)&&e.jsxs("div",{className:"flex flex-col gap-2 text-orange-400 bg-orange-400/10 border border-orange-400/30 rounded-xl p-3 text-sm",children:[e.jsxs("span",{className:"flex items-start gap-2",children:[e.jsx(O,{className:"mt-0.5 shrink-0"}),e.jsx("span",{className:"whitespace-pre-line",children:ue||fe})]}),Ke&&e.jsxs("a",{href:bt(),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 self-start text-xs font-medium text-brand hover:underline",children:["Continue on ChangeNOW ",e.jsx(at,{className:"text-[10px]"})]})]})]}),x==="deposit"&&l&&e.jsxs("div",{className:"surface-card p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white light:text-gray-900 mb-4",children:"Send Deposit"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Send exactly"}),e.jsxs("div",{className:"text-xl font-bold text-white light:text-gray-900",children:[l.depositAmount," ",r.symbol]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"To this address"}),e.jsxs("div",{className:"flex items-center gap-2 bg-white/5 light:bg-gray-100 rounded-xl p-3",children:[e.jsx("code",{className:"flex-1 text-sm text-brand break-all",children:l.depositAddress}),e.jsx("button",{onClick:Xe,className:"text-gray-400 hover:text-brand transition-colors shrink-0",title:"Copy address",children:$e?e.jsx(X,{className:"text-brand"}):e.jsx(De,{})})]})]}),l.depositExtraId&&e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Memo / Tag"}),e.jsxs("div",{className:"flex items-center gap-2 bg-white/5 light:bg-gray-100 rounded-xl p-3",children:[e.jsx("code",{className:"flex-1 text-sm text-white light:text-gray-900 font-bold",children:l.depositExtraId}),e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(l.depositExtraId)},className:"text-gray-400 hover:text-brand transition-colors shrink-0",children:e.jsx(De,{})})]})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400 pt-2 border-t border-white/10",children:[e.jsxs("span",{children:["Provider:"," ",e.jsx("strong",{className:"capitalize",children:l.provider==="letsexchange"?"LetsExchange":"ChangeNOW"})]}),e.jsxs("span",{children:["ID: ",l.exchangeId.slice(0,12),"..."]})]}),e.jsxs("div",{className:"bg-orange-400/10 border border-orange-400/30 rounded-xl p-3 text-sm text-orange-400",children:["Send only ",e.jsx("strong",{children:r.symbol})," to this address. Sending any other asset may result in permanent loss."]})]}),Ye?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:Je,disabled:je||le||oe,className:"w-full mt-6 py-3 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light disabled:opacity-40 disabled:cursor-not-allowed transition-colors flex items-center justify-center gap-2",children:je?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"animate-spin"})," Sending deposit..."]}):e.jsxs(e.Fragment,{children:["Send ",l.depositAmount," ",r.symbol," ",e.jsx(Y,{})]})}),e.jsx("button",{onClick:()=>
1u("track"),className:"w-full mt-2 text-xs text-gray-400 hover:text-brand transition-colors",children:"Already sent it from another wallet — track status"})]}):e.jsxs("button",{onClick:()=>u("track"),className:"w-full mt-6 py-3 rounded-xl font-semibold text-dark-bg bg-brand hover:bg-brand-light transition-colors flex items-center justify-center gap-2",children:["I've sent the deposit — Track status ",e.jsx(Y,{})]}),$&&e.jsxs("div",{className:"flex items-start gap-2 mt-3 text-orange-400 bg-orange-400/10 border border-orange-400/30 rounded-xl p-3 text-sm",children:[e.jsx(O,{className:"mt-0.5 shrink-0"}),e.jsx("span",{children:$})]}),(w==="kaspa"||h==="kaspa")&&e.jsx(yt,{variant:"page",className:"mt-3"}),ve&&e.jsxs("div",{className:"flex items-center gap-2 mt-3 text-orange-400 bg-orange-400/10 border border-orange-400/30 rounded-xl p-3 text-sm",children:[e.jsx(O,{}),ve]})]}),x==="track"&&l&&e.jsxs("div",{className:"surface-card p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-white light:text-gray-900 mb-4",children:"Exchange Status"}),e.jsx("div",{className:"space-y-0 mb-6",children:D.map((t,a)=>{const i=Re>a,m=Re===a,g=_==="failed"&&a===D.length-1;return e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-4 h-4 rounded-full border-2 shrink-0 ${i?"bg-brand border-brand":m?"border-brand bg-brand/30":g?"bg-red-500 border-red-500":"border-gray-500 bg-transparent"}`,children:i&&e.jsx(X,{className:"text-dark-bg text-[8px] m-[3px]"})}),a<D.length-1&&e.jsx("div",{className:`w-0.5 h-8 ${i?"bg-brand":"bg-gray-600"}`})]}),e.jsxs("div",{className:"pt-0",children:[e.jsx("span",{className:`text-sm ${i?"text-brand":m?"text-white light:text-gray-900 font-medium":g?"text-red-400":"text-gray-500"}`,children:g&&a===D.length-1?"Failed":t.label}),m&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-400 mt-0.5",children:[e.jsx(F,{className:"animate-spin"})," In progress..."]})]})]},t.key)})}),e.jsxs("div",{className:"text-xs text-gray-400 space-y-1 pt-4 border-t border-white/10",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Provider"}),e.jsx("span",{className:"capitalize font-medium",children:l.provider==="letsexchange"?"LetsExchange":"ChangeNOW"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Exchange ID"}),e.jsx("span",{className:"font-mono",children:l.exchangeId})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{children:"Deposit"}),e.jsxs("span",{children:[l.depositAmount," ",r.symbol]})]}),ae&&e.jsxs("div",{className:"flex justify-between gap-2",children:[e.jsx("span",{className:"shrink-0",children:w==="ton"?"Signed message":"Transaction"}),e.jsxs("span",{className:"font-mono truncate",title:ae,children:[ae.slice(0,16),"..."]})]})]}),e.jsxs("div",{className:"mt-6 space-y-2",children:[$&&e.jsxs("div",{className:"flex items-start gap-2 text-orange-400 bg-orange-400/10 border border-orange-400/30 rounded-xl p-3 text-sm",children:[e.jsx(O,{className:"mt-0.5 shrink-0"}),e.jsx("span",{children:$})]}),_==="completed"&&e.jsxs("div",{className:"flex items-center gap-2 text-brand bg-brand/10 border border-brand/30 rounded-xl p-3 text-sm",children:[e.jsx(X,{})," Exchange completed successfully!"]}),_==="failed"&&e.jsxs("div",{className:"flex items-center gap-2 text-red-400 bg-red-400/10 border border-red-400/30 rounded-xl p-3 text-sm",children:[e.jsx(O,{})," Exchange failed. Please contact support with ID: ",l.exchangeId]}),e.jsxs("button",{onClick:Ie,className:"w-full py-3 rounded-xl font-semibold border border-white/10 light:border-gray-300 text-white light:text-gray-900 hover:bg-white/5 transition-colors flex items-center justify-center gap-2",children:[e.jsx(rt,{})," New Exchange"]})]})]}),e.jsx(pt,{kind:"cross-chain",onResume:Te,canResume:t=>H(t)===null,activeRecordId:l?de(l.provider,l.exchangeId):null})]})})}export{Lt as default};
2//# sourceMappingURL=CrossChainPage-dgBizpJe.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.