1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2898],{26375:(e,t,n)=>{n.d(t,{O:()=>r});let r="sdk_fiat_on_ramp_completed_with_status"},34600:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(1831);let i=r.forwardRef(function({title:e,titleId:t,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M15.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H7.5a.75.75 0 0 1 0-1.5h11.69l-3.22-3.22a.75.75 0 0 1 0-1.06Zm-7.94 9a.75.75 0 0 1 0 1.06l-3.22 3.22H16.5a.75.75 0 0 1 0 1.5H4.81l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))})},44267:(e,t,n)=>{n.d(t,{B:()=>i,C:()=>l,F:()=>s,H:()=>o,R:()=>f,S:()=>u,a:()=>c,b:()=>p,c:()=>d,d:()=>m,e:()=>a});var r=n(3589);let i=r.I4.div.withConfig({displayName:"BottomPusherContainer",componentId:"sc-cb963810-0"})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;margin-top:auto;gap:16px;flex-grow:100;"]),a=r.I4.div.withConfig({displayName:"CenteredItem",componentId:"sc-cb963810-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;width:100%;"]),o=r.I4.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),l=(0,r.I4)(a).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),d=(0,r.I4)(a).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),s=r.I4.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),c=r.I4.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),u=r.I4.div.withConfig({displayName:"StyledCalloutSection",componentId:"sc-cb963810-8"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;padding:16px;margin-top:16px;margin-bottom:16px;width:100%;background:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);&& h4{color:var(--privy-color-foreground-3);font-size:14px;text-decoration:underline;font-weight:medium;}&& p{color:var(--privy-color-foreground-3);font-size:14px;}"]),p=r.I4.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),f=r.I4.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"})(["height:12px;"]),m=r.I4.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],e=>e.height??"12")},62185:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(1831);let i=r.forwardRef(function({title:e,titleId:t,...n},i){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))})},92898:(e,t,n)=>{n.r(t),n.d(t,{CoinbaseOnrampStatusScreen:()=>h,default:()=>h});var r=n(36495),i=n(34600),a=n(62185),o=n(1831),l=n(3589),d=n(81800),s=n(44267),c=n(80169),u=n(11396),p=n(55996),f=n(38017),m=n(26375),g=n(13510);n(87635),n(45660),n(12226),n(49606),n(21124);let h={component:()=>{let{data:e,setModalData:t,navigate:n,navigateBack:i}=(0,f.a)(),{closePrivyModal:a,createAnalyticsEvent:l,client:d}=(0,p.u)(),[s,c]=(0,o.useState)("pending-in-flow"),g=(0,o.useRef)(0),h={...e?.funding,showAlternateFundingMethod:!0};h.usingDefaultFundingMethod&&(h.usingDefaultFundingMethod=!1);let{partnerUserId:y,popup:v}=e?.coinbaseOnrampStatus??{};return(0,o.useEffect)(()=>
1{if("pending-in-flow"===s||"pending-after-flow"===s){let r=setInterval(async()=>{if(y)try{let{status:r}=await d.getCoinbaseOnRampStatus({partnerUserId:y});if("success"===r)return void c("success");if("failure"===r)throw Error("There was an error completing Coinbase Onramp flow.");if(g.current>=3)return t({funding:h,solanaFundingData:e?.solanaFundingData}),void n("FundingMethodSelectionScreen");v?.closed&&(g.current=g.current+1,c("pending-after-flow"))}catch(r){console.error(r),c("error"),l({eventName:m.O,payload:{status:"failure",provider:"coinbase-onramp",error:r.message}}),t({funding:{...h,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:e?.solanaFundingData}),n("FundingMethodSelectionScreen")}},1500);return()=>clearInterval(r)}},[y,v,s]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.M,{title:"Fund account",backFn:()=>{t({funding:h,solanaFundingData:e?.solanaFundingData}),i()}},"header"),(0,r.jsx)(x,{status:s,onClickCta:a}),(0,r.jsx)(u.B,{})]})}},x=({status:e,onClickCta:t})=>{let{title:n,body:i,cta:a}=(0,o.useMemo)(()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(e),[e]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(w,{children:[(0,r.jsx)(y,{isSucccess:"success"===e}),(0,r.jsxs)(s.a,{children:[(0,r.jsx)("h3",{children:n}),(0,r.jsx)(v,{children:i})]})]}),a&&(0,r.jsx)(d.P,{onClick:t,children:a})]})},y=({isSucccess:e})=>{if(!e){let e="var(--privy-color-foreground-4)";return(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsx)(c.L,{color:e,style:{position:"absolute"}}),(0,r.jsx)(c.a7,{color:e}),(0,r.jsx)(g.G,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let t=e?a.A:()=>(0,r.jsx)(i.A,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),n=e?"var(--privy-color-success)":"var(--privy-color-foreground-4)";return(0,r.jsx)("div",{style:{borderColor:n,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&(0,r.jsx)(t,{width:"4rem",height:"4rem",color:n})})},v=l.I4.p.withConfig({displayName:"StatusBody",componentId:"sc-e4350fdc-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),w=l.I4.div.withConfig({displayName:"ConnectContainer",componentId:"sc-e4350fdc-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"])}}]);
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.