PageSourceSearch

https://www.sovra.dev/assets/LinkConflictScreen-B-yRqIRn-BRVWkr3-.js

js sovra.dev collected 2026-10-07 08:51:22 UTC 8,032 bytes, 79 lines download raw bytes

1import{db as l,d9 as S,d6 as $,d8 as e,d7 as W,du as a}from"./index-DqXOdYDp.js";import{F as E}from"./ExclamationTriangleIcon-EDZpLXyb.js";import{F as g}from"./WalletIcon-CBFP3FJ3.js";import{T as j,m as y,$ as R,b as w}from"./ModalHeader-CvLNEZ0F-DJp7WUeP.js";import{i as F}from"./StackedContainer-B2vaEl56-T9yxdBeT.js";import{d as v}from"./Address-BmCgxKQR-0MzEYuLd.js";import{e as M}from"./capitalizeFirstLetter-DmLYqXsO-tV1Idewc.js";import{F as z}from"./ExclamationCircleIcon-DMG1BLrZ.js";import"./check-mNhpRtSD.js";import"./createLucideIcon-DAe5CP0H.js";import"./copy-C-K6ztXg.js";function I({title:r,titleId:n,...t},i){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":n},t),r?l.createElement("title",{id:n},r):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 0 0-2.25 2.25v6"}))}const L=l.forwardRef(I),D=a.span`
2  && {
3    width: 82px;
4    height: 82px;
5    border-width: 4px;
6    border-style: solid;
7    border-color: ${r=>r.color??"var(--privy-color-accent)"};
8    border-bottom-color: transparent;
9    border-radius: 50%;
10    display: inline-block;
11    box-sizing: border-box;
12    animation: rotation 1.2s linear infinite;
13    transition: border-color 800ms;
14    border-bottom-color: ${r=>r.color??"var(--privy-color-accent)"};
15  }
16`;function B(r){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...r,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),e.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}const b=({onTransfer:r,isTransferring:n,transferSuccess:t})=>e.jsx(y,{...t?{success:!0,children:"Success!"}:{warn:!0,loading:n,onClick:r,children:"Transfer and delete account"}}),T=a.div`
17  display: flex;
18  flex-direction: column;
19  align-items: center;
20  justify-content: center;
21  gap: 8px;
22  width: 100%;
23  padding-bottom: 16px;
24`,f=a.div`
25  display: flex;
26  flex-direction: column;
27  && p {
28    font-size: 14px;
29  }
30  width: 100%;
31  gap: 16px;
32`,k=a.div`
33  display: flex;
34  cursor: pointer;
35  align-items: center;
36  width: 100%;
37  border: 1px solid var(--privy-color-foreground-4) !important;
38  border-radius: var(--privy-border-radius-md);
39  padding: 8px 10px;
40  font-size: 14px;
41  font-weight: 500;
42  gap: 8px;
43`,N=a(z)`
44  position: relative;
45  width: ${({$iconSize:r})=>`${r}px`};
46  height: ${({$iconSize:r})=>`${r}px`};
47  color: var(--privy-color-foreground-3);
48  margin-left: auto;
49`,P=a(L)`
50  position: relative;
51  width: 15px;
52  height: 15px;
53  color: var(--privy-color-foreground-3);
54  margin-left: auto;
55`,V=a.ol`
56  display: flex;
57  flex-direction: column;
58  font-size: 14px;
59  width: 100%;
60  text-align: left;
61`,m=a.li`
62  font-size: 14px;
63  list-style-type: auto;
64  list-style-position: outside;
65  margin-left: 1rem;
66  margin-bottom: 0.5rem; /* Adjust the margin as needed */
67
68  &:last-child {
69    margin-bottom: 0; /* Remove margin from the last item */
70  }
71`,H=a.div`
72  position: relative;
73  width: 60px;
74  height: 60px;
75  margin: 10px;
76  display: flex;
77  justify-content: center;
78  align-items: center;
79`;let U=()=>e.jsx(H,{children:e.jsx(N,{$iconSize:60})});const _=({address:r,onClose:n,onRetry:t,onTransfer:i,isTransferring:d,transferSuccess:u})=>{let{defaultChain:o}=W(),s=o.blockExplorers?.default.url??"https://etherscan.io";return e.jsxs(e.Fragment,{children:[e.jsx(j,{onClose:n,backFn:t}),e.jsxs(T,{children:[e.jsx(U,{}),e.jsxs(f,{children:[e.jsx("h3",{children:"Check account assets before transferring"}),e.jsx("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),e.jsxs(V,{children:[e.jsx("p",{children:" To check your balance, you can:"}),e.jsx(m,{children:"Log out and log back into the other account, or "}),e.jsxs(m,{children:["Copy your wallet address and use a"," ",e.jsx("u",{children:e.jsx("a",{target:"_blank",href:s,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),e.jsxs(k,{onClick:()=>
79navigator.clipboard.writeText(r).catch(console.error),children:[e.jsx(g,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),e.jsx(v,{address:r,showCopyIcon:!1}),e.jsx(P,{})]}),e.jsx(b,{onTransfer:i,isTransferring:d,transferSuccess:u})]})]}),e.jsx(w,{})]})},oe={component:()=>{let{initiateAccountTransfer:r,closePrivyModal:n}=S(),{data:t,navigate:i,lastScreen:d,setModalData:u}=$(),[o,s]=l.useState(void 0),[c,C]=l.useState(!1),[h,p]=l.useState(!1),x=async()=>{try{if(!t?.accountTransfer?.nonce||!t?.accountTransfer?.account)throw Error("missing account transfer inputs");p(!0),await r({nonce:t?.accountTransfer?.nonce,account:t?.accountTransfer?.account,accountType:t?.accountTransfer?.linkMethod,externalWalletMetadata:t?.accountTransfer?.externalWalletMetadata,telegramWebAppData:t?.accountTransfer?.telegramWebAppData,telegramAuthResult:t?.accountTransfer?.telegramAuthResult,farcasterEmbeddedAddress:t?.accountTransfer?.farcasterEmbeddedAddress,oAuthUserInfo:t?.accountTransfer?.oAuthUserInfo}),C(!0),p(!1),setTimeout(n,1e3)}catch(A){u({errorModalData:{error:A,previousScreen:d||"LinkConflictScreen"}}),i("ErrorScreen",!0)}};return o?e.jsx(_,{address:o,onClose:n,onRetry:()=>s(void 0),onTransfer:x,isTransferring:h,transferSuccess:c}):e.jsx(q,{onClose:n,onInfo:()=>s(t?.accountTransfer?.embeddedWalletAddress),onContinue:()=>s(t?.accountTransfer?.embeddedWalletAddress),onTransfer:x,isTransferring:h,transferSuccess:c,data:t})}},q=({onClose:r,onContinue:n,onInfo:t,onTransfer:i,transferSuccess:d,isTransferring:u,data:o})=>{if(!o?.accountTransfer?.linkMethod||!o?.accountTransfer?.displayName)return;let s={method:o?.accountTransfer?.linkMethod,handle:o?.accountTransfer?.displayName,disclosedAccount:o?.accountTransfer?.embeddedWalletAddress?{type:"wallet",handle:o?.accountTransfer?.embeddedWalletAddress}:void 0};return e.jsxs(e.Fragment,{children:[e.jsx(j,{closeable:!0}),e.jsxs(T,{children:[e.jsx(F,{children:e.jsxs("div",{children:[e.jsx(D,{color:"var(--privy-color-error)"}),e.jsx(E,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),e.jsxs(f,{children:[e.jsxs("h3",{children:[(function(c){switch(c){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return`${M(c.replace("_oauth",""))} profile`;default:return c.startsWith("privy:")?"Cross-app account":c}})(s.method)," is associated with another account"]}),e.jsxs("p",{children:["Do you want to transfer",e.jsx("b",{children:s.handle?` ${s.handle}`:""})," to this account instead? This will delete your other account."]}),e.jsx(O,{onClick:t,disclosedAccount:s.disclosedAccount})]}),e.jsxs(f,{style:{gap:12,marginTop:12},children:[o?.accountTransfer?.embeddedWalletAddress?e.jsx(y,{onClick:n,children:"Continue"}):e.jsx(b,{onTransfer:i,transferSuccess:d,isTransferring:u}),e.jsx(R,{onClick:r,children:"No thanks"})]})]}),e.jsx(w,{})]})};function O({disclosedAccount:r,onClick:n}){return r?e.jsxs(k,{onClick:n,children:[e.jsx(g,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),e.jsx(v,{address:r.handle,showCopyIcon:!1}),e.jsx(B,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}export{oe as LinkConflictScreen,q as LinkConflictScreenView,oe as default};

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.