1/*! For license information please see 6425.962a68e0.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkico_react=self.webpackChunkico_react||[]).push([[6425],{66425:(e,t,a)=>{a.r(t),a.d(t,{ErrorScreen:()=>f,ErrorScreenView:()=>y,default:()=>f});var r=a(90034),n=a(90513);const i=(0,n.A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),o=(0,n.A)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var s=a(33307),l=a(52610),c=a(99844),d=a(78055),u=a(51380),T=a(49931),g=a(99788),h=a(23316);a(57722),a(88404),a(30549),a(2035),a(82425),a(82595);const y=e=>{let{error:t,allowlistConfig:a,onRetry:n,onCaptchaReset:l,onBack:c}=e,T=((e,t)=>{if(e instanceof g.R)return{title:"Transaction failed",detail:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:e.message}),(0,r.jsxs)("span",{children:[" ","Check the"," ",(0,r.jsx)(p,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(e instanceof u.a)switch(e.privyErrorCode){case u.b.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:i};case u.b.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:i};case u.b.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(e instanceof d.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:o};if(!(e instanceof u.c))return e instanceof u.e&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(e.privyErrorCode){case u.b.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case u.b.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:i};case u.b.ALLOWLIST_REJECTED:return{title:t.errorTitle||"You don't have access to this app",detail:t.errorDetail||"Have you been invited?",ctaText:t.errorCtaText||"Try another account",icon:s.A};case u.b.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case u.b.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case u.b.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case u.b.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case u.b.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(t,a);return(0,r.jsx)(h.S,{title:T.title,subtitle:T.detail,icon:T.icon,onBack:c,iconVariant:"error",primaryCta:{label:T.ctaText,onClick:()=>{t instanceof u.c&&(t.privyErrorCode===u.b.INVALID_CAPTCHA&&null!==l&&void 0!==l&&l(),t.privyErrorCode===u.b.ALLOWLIST_REJECTED&&a.errorCtaLink)?window.location.href=a.errorCtaLink:null===n||void 0===n||n()},variant:"error"},watermark:!0})},f={component:()=>{var e,t;let{navigate:a,data:n,lastScreen:i,currentScreen:o}=(0,T.a)(),s=(0,c.u)(),{reset:l}=(0,d.a)(),u=(null===n||void 0===n||null===(e=n.errorModalData)||void 0===e?void 0:e.previousScreen)||(i===o?void 0:i);return(0,r.jsx)(y,{error:(null===n||void 0===n||null===(t=n.errorMod
2alData)||void 0===t?void 0:t.error)||Error(),allowlistConfig:s.allowlistConfig,onRetry:()=>{a(u||"LandingScreen",!1)},onCaptchaReset:l})}};let p=l.I4.a.withConfig({displayName:"Link",componentId:"sc-506514cb-0"})(["color:var(--privy-color-accent) !important;font-weight:600;"])},99788:(e,t,a)=>{a.d(t,{R:()=>v,a:()=>c,b:()=>l,c:()=>f,d:()=>d,g:()=>y,t:()=>T,u:()=>p});var r=a(24107),n=a(15882),i=a(57722),o=a(51380);const s=["appId","originCurrency","destinationCurrency"],l=792703809,c="11111111111111111111111111111111",d="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";let u="0x0000000000000000000000000000000000000000";const T=e=>{let{appId:t,originCurrency:a,destinationCurrency:i}=e,o=(0,n.A)(e,s);return(0,r.A)({tradeType:"EXPECTED_OUTPUT",originCurrency:null!==a&&void 0!==a?a:u,destinationCurrency:null!==i&&void 0!==i?i:u,referrer:"privy|".concat(t)},o)};let g="https://api.relay.link",h="https://api.testnets.relay.link";const y=async e=>{var t;let{input:a,isTestnet:r}=e,n=await fetch((r?h:g)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),i=await n.json();if(!(n.ok||"string"==typeof i.message&&i.message.startsWith("Invalid address")))throw console.error("Relay error:",i),Error(null!==(t=i.message)&&void 0!==t?t:"Error fetching quote from relay");return i},f=e=>{var t;let a=null===(t=e.steps[0])||void 0===t||null===(t=t.items)||void 0===t?void 0:t[0];if(a)return{from:a.data.from,to:a.data.to,value:Number(a.data.value),chainId:Number(a.data.chainId),data:a.data.data}};function p(e){let{transactionHash:t,isTestnet:a,bridgingStatus:r,setBridgingStatus:n,onSuccess:o,onFailure:s}=e;(0,i.useEffect)(()=>{if(t&&r){if(["delayed","waiting","pending"].includes(r)){let e=setInterval(async()=>{try{let e=await async function(e){var t,a;let{transactionHash:r,isTestnet:n}=e,i=await fetch((n?h:g)+"/requests/v2?hash="+r),o=await i.json();if(!i.ok){if("message"in o&&"string"==typeof o.message)throw Error(o.message);throw Error("Error fetching request from relay")}return null!==(t=null===(a=o.requests.at(0))||void 0===a?void 0:a.status)&&void 0!==t?t:"pending"}({transactionHash:t,isTestnet:a});n(e)}catch(e){console.error(e)}},1e3);return()=>clearInterval(e)}"success"===r?o({transactionHash:t}):["refund","failure"].includes(r)&&s({error:new v(t,a)})}},[r,t,a])}class v extends o.a{constructor(e,t){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,o.b.TRANSACTION_FAILURE),this.relayLink=t?"https://testnets.relay.link/transaction/".concat(e):"https://relay.link/transaction/".concat(e)}}}}]); 3//# sourceMappingURL=6425.962a68e0.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.