1"use strict";(self.webpackChunkico_react=self.webpackChunkico_react||[]).push([[70],{14466:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(15882),o=n(57722);const r=["title","titleId"];function a(e,t){let{title:n,titleId:a}=e,l=(0,i.A)(e,r);return o.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:t,"aria-labelledby":a},l),n?o.createElement("title",{id:a},n):null,o.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"}))}const l=o.forwardRef(a)},60229:(e,t,n)=>{n.d(t,{B:()=>o,C:()=>l,F:()=>s,H:()=>a,R:()=>f,S:()=>u,a:()=>c,b:()=>p,c:()=>d,d:()=>m,e:()=>r});var i=n(52610);const o=i.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;"]),r=i.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%;"]),a=i.I4.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),l=(0,i.I4)(r).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),d=(0,i.I4)(r).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),s=i.I4.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),c=i.I4.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),u=i.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=i.I4.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),f=i.I4.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"})(["height:12px;"]),m=i.I4.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],e=>{var t;return null!==(t=e.height)&&void 0!==t?t:"12"})},67665:(e,t,n)=>{n.d(t,{O:()=>i});const i="sdk_fiat_on_ramp_completed_with_status"},69095:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(15882),o=n(57722);const r=["title","titleId"];function a(e,t){let{title:n,titleId:a}=e,l=(0,i.A)(e,r);return o.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:t,"aria-labelledby":a},l),n?o.createElement("title",{id:a},n):null,o.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"}))}const l=o.forwardRef(a)},80070:(e,t,n)=>{n.r(t),n.d(t,{CoinbaseOnrampStatusScreen:()=>v,default:()=>v});var i=n(24107),o=n(90034),r=n(14466),a=n(69095),l=n(57722),d=n(52610),s=n(67980),c=n(60229),u=n(1991),p=n(33898),f=n(51380),m=n(49931),g=n(67665),h=n(78055);n(88404),n(2035),n(30549),n(82425),n(82595);const v={component:()=>{var e;let{data:t,setModalData:n,navigate:r,navigateBack:a}=(0,m.a)(),{closePrivyModal:d,createAnalyticsEvent:s,client:c}=(0,f.u)(),[u,h]=(0,l.useState)("pending-in-flow"),v=(0,l.useRef)(0),y=(0,i.A)((0,i.A)({},null===t||void 0===t?void 0:t.funding),{},{showAlternateFundingMethod:!0});y.usingDefaultFundingMethod&&(y.usingDefaultFundingMethod=!1);let{partnerUserId:w,popup:b}=null!==(e=null===t||void 0===t?void 0:t.coinbaseOnrampStatus)&&void 0!==e?e:{};return(0,l.useEffect)(()=>
1{if("pending-in-flow"===u||"pending-after-flow"===u){let e=setInterval(async()=>{if(w)try{let{status:e}=await c.getCoinbaseOnRampStatus({partnerUserId:w});if("success"===e)return void h("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(v.current>=3)return n({funding:y,solanaFundingData:null===t||void 0===t?void 0:t.solanaFundingData}),void r("FundingMethodSelectionScreen");(null===b||void 0===b?void 0:b.closed)&&(v.current=v.current+1,h("pending-after-flow"))}catch(e){console.error(e),h("error"),s({eventName:g.O,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),n({funding:(0,i.A)((0,i.A)({},y),{},{errorMessage:"Something went wrong adding funds. Please try again or use another method."}),solanaFundingData:null===t||void 0===t?void 0:t.solanaFundingData}),r("FundingMethodSelectionScreen")}},1500);return()=>clearInterval(e)}},[w,b,u]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.M,{title:"Fund account",backFn:()=>{n({funding:y,solanaFundingData:null===t||void 0===t?void 0:t.solanaFundingData}),a()}},"header"),(0,o.jsx)(x,{status:u,onClickCta:d}),(0,o.jsx)(p.B,{})]})}};let x=e=>{let{status:t,onClickCta:n}=e,{title:i,body:r,cta:a}=(0,l.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:""}}})(t),[t]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(b,{children:[(0,o.jsx)(y,{isSucccess:"success"===t}),(0,o.jsxs)(c.a,{children:[(0,o.jsx)("h3",{children:i}),(0,o.jsx)(w,{children:r})]})]}),a&&(0,o.jsx)(s.P,{onClick:n,children:a})]})},y=e=>{let{isSucccess:t}=e;if(!t){let e="var(--privy-color-foreground-4)";return(0,o.jsxs)("div",{style:{position:"relative"},children:[(0,o.jsx)(u.L,{color:e,style:{position:"absolute"}}),(0,o.jsx)(u.a7,{color:e}),(0,o.jsx)(h.G,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=t?a.A:()=>(0,o.jsx)(r.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"}}),i=t?"var(--privy-color-success)":"var(--privy-color-foreground-4)";return(0,o.jsx)("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&(0,o.jsx)(n,{width:"4rem",height:"4rem",color:i})})},w=d.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;"]),b=d.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;"])}}]); 2//# sourceMappingURL=70.a377ac13.chunk.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.