1"use strict";(self.webpackChunkico_react=self.webpackChunkico_react||[]).push([[5457],{2559:(e,n,i)=>{i.d(n,{u:()=>o});var t=i(32381);function o(e){let n=e.filter(e=>!t.o.has(e.id));return t.m.concat(n)}},25457:(e,n,i)=>{i.r(n),i.d(n,{FundingAmountEditScreen:()=>h,default:()=>h});var t=i(24107),o=i(90034),a=i(57722),r=i(67980),d=i(60229),c=i(33898),s=i(51781),l=i(76107),p=i(69846),u=i(49931),f=i(66290),g=i(62802),m=i(66222);i(88404),i(2035),i(30549);const h={component:()=>{var e;let{data:n,setModalData:i}=(0,u.a)(),h=null===n||void 0===n?void 0:n.funding,v="solana"===h.chainType,x=(0,a.useRef)(null),{tokenPrice:y}=(0,f.u)(v?"solana":h.chain.id),I=v?void 0:h,b=!(null===I||void 0===I||!I.erc20Address||null!==I&&void 0!==I&&I.erc20ContractInfo),C=v?h.isUSDC?"USDC":"SOL":h.erc20Address?null===(e=h.erc20ContractInfo)||void 0===e?void 0:e.symbol:h.chain.nativeCurrency.symbol||"ETH",w=parseFloat(h.amount),F=!isNaN(w)&&w>0,N=y?(0,g.c)(h.amount,y):void 0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.t,{}),(0,o.jsx)(p.T,{children:"Confirm or edit amount"}),(0,o.jsxs)(d.F,{style:{marginTop:"32px"},children:[(0,o.jsx)(m.F,{children:b?(0,o.jsx)(l.N,{size:"50px"}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(m.a,{onClick:()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.focus()},children:[(0,o.jsx)(m.h,{ref:x,value:h.amount,onChange:e=>{let o=e.target.value;/^[0-9.]*$/.test(o)&&o.split(".").length-1<=1&&i((0,t.A)((0,t.A)({},n),{},{funding:(0,t.A)((0,t.A)({},h),{},{amount:o}),solanaFundingData:null!==n&&void 0!==n&&n.solanaFundingData?(0,t.A)((0,t.A)({},n.solanaFundingData),{},{amount:o}):void 0}))}}),(0,o.jsx)(m.c,{children:C})]}),!(null!==I&&void 0!==I&&I.erc20Address)&&(0,o.jsx)(m.d,{children:N&&F?"".concat(N," USD"):""})]})}),(0,o.jsx)(r.a,{style:{marginTop:"1rem"},disabled:!F,onClick:h.onContinueWithExternalWallet,children:"Continue"})]}),(0,o.jsx)(c.B,{})]})}}},51781:(e,n,i)=>{i.d(n,{t:()=>r});var t=i(90034),o=i(49931),a=i(33898);function r(e){var n,i;let{title:r}=e,{currentScreen:d,navigateBack:c,navigate:s,data:l,setModalData:p}=(0,o.a)();return(0,t.jsx)(a.M,{title:r,backFn:"ManualTransferScreen"===d?c:d===(null===l||void 0===l||null===(n=l.funding)||void 0===n?void 0:n.methodScreen)?l.funding.comingFromSendTransactionScreen?()=>s("SendTransactionScreen"):void 0:null!==l&&void 0!==l&&null!==(i=l.funding)&&void 0!==i&&i.methodScreen?()=>{let e=l.funding;e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),p({funding:e,solanaFundingData:null===l||void 0===l?void 0:l.solanaFundingData}),s(e.methodScreen)}:void 0})}},60229:(e,n,i)=>{i.d(n,{B:()=>o,C:()=>d,F:()=>s,H:()=>r,R:()=>f,S:()=>p,a:()=>l,b:()=>u,c:()=>c,d:()=>g,e:()=>a});var t=i(52610);const o=t.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=t.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%;"]),r=t.I4.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),d=(0,t.I4)(a).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),c=(0,t.I4)(a).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),s=t.I4.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),l=t.I4.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),p=t.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;}"]),u=t.I4.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),f=t.I4.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"}
1)(["height:12px;"]),g=t.I4.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],e=>{var n;return null!==(n=e.height)&&void 0!==n?n:"12"})},62802:(e,n,i)=>{i.d(n,{a:()=>s,b:()=>f,c:()=>c,g:()=>l,p:()=>p,s:()=>u});var t=i(62016),o=i(51380),a=i(1991);let r=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),d=e=>r.format(e);const c=(e,n)=>{let i=d(n*parseFloat(e));return"$0.00"!==i?i:"<$0.01"},s=(e,n)=>{let i=d(n*parseFloat((0,t.c)(e)));return"$0.00"===i?"<$0.01":i},l=function(e,n){return"".concat(p(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:6,arguments.length>3&&void 0!==arguments[3]&&arguments[3])," ").concat(n)},p=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=parseFloat((0,t.c)(e)).toFixed(n).replace(/0+$/,"").replace(/\.$/,"");return i?o:"".concat("0"===o?"<0.001":o)},u=e=>e.reduce((e,n)=>e+n,0n),f=(e,n)=>{let{chains:i}=(0,o.u)(),t="https://etherscan.io/address/".concat(n),r="".concat((0,a.a5)(e,i),"/address/").concat(n);if(!r)return t;try{new URL(r)}catch(d){return t}return r}},66222:(e,n,i)=>{i.d(n,{F:()=>r,I:()=>a,a:()=>d,b:()=>c,c:()=>l,d:()=>p,e:()=>o,f:()=>u,g:()=>f,h:()=>s});var t=i(52610);const o=t.I4.div.withConfig({displayName:"FundingMethodContainer",componentId:"sc-eaaa12a-0"})(["display:flex;flex-direction:column;gap:12px;padding-top:24px;padding-bottom:24px;"]),a=t.I4.div.withConfig({displayName:"IconContainer",componentId:"sc-eaaa12a-1"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;svg{border-radius:var(--privy-border-radius-sm);}"]),r=t.I4.div.withConfig({displayName:"FundingQuantityWrapper",componentId:"sc-eaaa12a-2"})(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;"]),d=t.I4.div.withConfig({displayName:"FundingQuantity",componentId:"sc-eaaa12a-3"})(["display:flex;align-items:center;gap:4px;width:100%;padding:0 16px;border-width:1px !important;border-radius:12px;cursor:text;&:focus-within{border-color:var(--privy-color-accent);}"]),c=t.I4.input.withConfig({displayName:"FundingAmountInput",componentId:"sc-eaaa12a-5"})(["background-color:var(--privy-color-background);width:100%;&:focus{outline:none !important;border:none !important;box-shadow:none !important;}&&{font-size:26px;}"]),s=(0,t.I4)(c).withConfig({displayName:"FundingAmountInputLarge",componentId:"sc-eaaa12a-6"})(["&&{font-size:42px;}"]),l=t.I4.div.withConfig({displayName:"FundingCurrency",componentId:"sc-eaaa12a-8"})(["font-size:18px;"]),p=t.I4.div.withConfig({displayName:"FundingDollars",componentId:"sc-eaaa12a-9"})(["font-size:12px;color:var(--privy-color-foreground-3);height:20px;"]),u=t.I4.div.withConfig({displayName:"InfoButtonText",componentId:"sc-eaaa12a-13"})([""]),f=t.I4.a.withConfig({displayName:"InfoButtonLink",componentId:"sc-eaaa12a-14"})(["&&{color:var(--privy-color-accent);}cursor:pointer;"])},66290:(e,n,i)=>{i.d(n,{u:()=>c});var t=i(57722),o=i(2559),a=i(99844),r=i(51380),d=i(75059);function c(e){let{tokenPrice:n,isTokenPriceLoading:i,tokenPriceError:c}=(e=>{let{showFiatPrices:n,getUsdTokenPrice:i,chains:d}=(0,r.u)(),[c,s]=(0,t.useState)(!0),[l,p]=(0,t.useState)(void 0),[u,f]=(0,t.useState)(void 0);return(0,t.useEffect)(()=>{e||(e=a.s);let t=(0,o.u)(d).find(n=>n.id===Number(e));(async()=>{if(n){if(!t)return s(!1),void p(Error("Unable to fetch token price on chain id ".concat(e)));try{s(!0);let e=await i(t);e?f(e):p(Error("Unable to fetch token price on chain id ".concat(t.id)))}catch(t){p(t)}finally{s(!1)}}else s(!1)})()},[e]),{tokenPrice:u,isTokenPriceLoading:c,tokenPriceError:l}}
1)("solana"===e?-1:e),{solPrice:s,isSolPriceLoading:l,solPriceError:p}=(0,d.u)({enabled:"solana"===e});return"solana"===e?{tokenPrice:s,isTokenPriceLoading:l,tokenPriceError:p}:{tokenPrice:n,isTokenPriceLoading:i,tokenPriceError:c}}},69846:(e,n,i)=>{i.d(n,{T:()=>t});const t=i(52610).I4.span.withConfig({displayName:"Title",componentId:"sc-66de63c-0"})(["color:var(--privy-color-foreground);font-size:1.125rem;font-weight:600;line-height:1.875rem;text-align:center;"])},75059:(e,n,i)=>{i.d(n,{u:()=>a});var t=i(57722),o=i(51380);const a=function(){let{enabled:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{showFiatPrices:n,getUsdPriceForSol:i}=(0,o.u)(),[a,r]=(0,t.useState)(!0),[d,c]=(0,t.useState)(void 0),[s,l]=(0,t.useState)(void 0);return(0,t.useEffect)(()=>{(async()=>{if(n&&e)try{r(!0);let e=await i();e?l(e):c(Error("Unable to fetch SOL price"))}catch(t){c(t)}finally{r(!1)}else r(!1)})()},[]),{solPrice:s,isSolPriceLoading:a,solPriceError:d}}},76107:(e,n,i)=>{i.d(n,{N:()=>a});var t=i(90034),o=i(52610);const a=e=>{let{size:n,centerIcon:i}=e;return(0,t.jsx)(r,{$size:n,children:(0,t.jsxs)(d,{children:[(0,t.jsx)(s,{}),(0,t.jsx)(l,{}),i?(0,t.jsx)(c,{children:i}):null]})})};let r=o.I4.div.withConfig({displayName:"LoadingContainer",componentId:"sc-ebc93df8-0"})(["--spinner-size:",";display:inline-flex;justify-content:center;align-items:center;@media all and (display-mode:standalone){margin-bottom:30px;}"],e=>e.$size?e.$size:"96px"),d=o.I4.div.withConfig({displayName:"SpinnerContainer",componentId:"sc-ebc93df8-1"})(["position:relative;height:var(--spinner-size);width:var(--spinner-size);opacity:1;animation:fadein 200ms ease;"]),c=o.I4.div.withConfig({displayName:"CenterIconContainer",componentId:"sc-ebc93df8-2"})(["position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;svg,img{width:calc(var(--spinner-size) * 0.4);height:calc(var(--spinner-size) * 0.4);border-radius:var(--privy-border-radius-full);}"]),s=o.I4.div.withConfig({displayName:"CircleFixed",componentId:"sc-ebc93df8-3"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);&&{border:4px solid var(--privy-color-border-default);border-radius:50%;}"]),l=o.I4.div.withConfig({displayName:"CircleRotate",componentId:"sc-ebc93df8-4"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);animation:spin 1200ms linear infinite;&&{border:4px solid;border-color:var(--privy-color-icon-subtle) transparent transparent transparent;border-radius:50%;}@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}"])}}]); 2//# sourceMappingURL=5457.79c480b9.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.