PageSourceSearch

https://dapplearning.org/_next/static/chunks/pages/wishlist/_AutoSwitchNetwork-6be18b91b7d8af7a.js

js dapplearning.org collected 2026-10-04 05:54:18 UTC 1,748 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3913],{97463:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wishlist/_AutoSwitchNetwork",function(){return e(75366)}])},71237:function(n,t,e){"use strict";e.d(t,{Z:function(){return s}});var r=e(33302),i=e(62574),o=e(61609);function s(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.SupportedChainId,{chain:t}=(0,r.m)(),{switchChainAsync:e}=(0,i.o)();return{isNetworkCorrect:()=>!!((null==t?void 0:t.id)&&Object.values(n).find(n=>n==(null==t?void 0:t.id))),switchNetwork:async()=>{try{return await e({chainId:o.SupportedChainId.OPTIMISM}),!0}catch(n){return console.error("switchChainAsync error: ",n),!1}}}}},75366:function(n,t,e){"use strict";e.r(t),e.d(t,{default:function(){return d}});var r=e(11527),i=e(50959),o=e(16785),s=e(33302),u=e(61609),c=e(71237);function d(n){let{forceSwitch:t=!1,configSupportedChainId:e=u.SupportedChainId}=n,{chain:d}=(0,s.m)(),[l,a]=(0,i.useState)(!1),{isNetworkCorrect:h,switchNetwork:w}=(0,c.Z)(e);return(0,o.Z)(()=>{(null==d?void 0:d.id)?h()?a(!1):(a(!0),t&&w()):a(!0)},1e3,[d,t]),(0,r.jsxs)("div",{role:"alert",className:"alert mt-4 max-w-lg mx-auto ".concat(l?"":"hidden"),children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("span",{children:"Network is wrong."}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{className:"btn btn-sm btn-outline",onClick:w,children:"Switch Network"})})]})}}},function(n){n.O(0,[2888,9774,179],function(){return n(n.s=97463)}),_N_E=n.O()}]);

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.