PageSourceSearch

https://paxpresalev5.netlify.app/assets/RecoveryPasswordCreateScreen-DdzD09T3-W3qrjAiB.js

js paxpresalev5.netlify.app collected 2026-10-03 11:15:22 UTC 2,473 bytes, 1 lines download raw bytes

1import{d6 as A,d7 as I,da as a,dB as T,d8 as W,d5 as R,dM as j,dX as S}from"./index-BEJHjMzZ.js";import{t as L}from"./use-create-wallet-without-fallback-COqi_EHH-CGlmylxI.js";import{p as $,o as B}from"./SetWalletPasswordForm-DUTEhc4R-RD_dWfc0.js";import"./ExclamationTriangleIcon-Coj6JIaY.js";import"./Layouts-Bmf8DxNP-C56ayoE6.js";import"./ModalHeader-CxHK1IKF-BIjJdrbS.js";import"./shared-BMOp6N9y-CeTXy-7C.js";import"./Button-OlK_6fKk-nybKmb7E.js";import"./Checkbox-NmGCZeKL-B1Bd4uLa.js";import"./CheckCircleIcon-DVZMTZB0.js";import"./ScreenHeader-Biz1wq02-CccmUSjm.js";const q={component:()=>{let{navigate:d,data:v,onUserCloseViaDialogOrKeybindRef:C}=A(),P=I(),[g,x]=a.useState(""),[c,u]=a.useState(!1),[s,h]=a.useState(),[n,b]=a.useState(null),{create:r}=L(),{authenticated:p,user:o}=T(),{closePrivyModal:l,isNewUserThisSession:E,initializeWalletProxy:U}=W(),{onSuccess:m,onFailure:i,callAuthOnSuccessOnClose:w,shouldCreateEth:f,shouldCreateSol:y}=v.createWallet,[t,M]=a.useState(null),O=new j((async()=>{try{let e;if(f&&y)e=await r({recoveryMethod:"user-passcode",recoveryPassword:s,chainType:"ethereum",walletIndex:0,latestUser:o}),e=await r({chainType:"solana",walletIndex:0,latestUser:e.user});else if(y)e=await r({recoveryMethod:"user-passcode",recoveryPassword:s,chainType:"solana",walletIndex:0,latestUser:o});else{if(!f)throw Error("Invalid args to create wallet");e=await r({recoveryMethod:"user-passcode",recoveryPassword:s,chainType:"ethereum",walletIndex:0,latestUser:o})}M(e),E?d("EmbeddedWalletCreatedScreen"):(m(e),l({shouldCallAuthOnSuccess:w}))}catch(e){x(e.message)}}));return a.useEffect((()=>{n||U(3e4).then((e=>b(e)))}),[n]),a.useEffect((()=>{if(!p||!o)return d("LandingScreen"),void i(Error("User must be authenticated before creating a Privy wallet"))}),[p]),C.current=()=>null,R.jsx($,{config:{initiatedBy:"automatic"},appName:P?.name||"privy",loading:!n,buttonLoading:c,buttonHideAnimations:!t&&c,isResettingPassword:!1,error:g,password:s||"",onClose:()=>{t&&t.account.recoveryMethod!=="user-passcode"?(i(new S("User created a wallet but failed to set a password for it")),l({shouldCallAuthOnSuccess:!1})):t?(m(t),l({shouldCallAuthOnSuccess:w})):(i(new S("User wallet creation failed")),l({shouldCallAuthOnSuccess:!1}))},onPasswordChange:h,onPasswordGenerate:()=>h(B()),onSubmit:async()=>(u(!0),O.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>u(!1))))})}};export{q as EmbeddedWalletPasswordCreateScreen,q 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.