1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6774],{30664:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/brokenbulls",function(){return n(30635)}])},30635:function(e,t,n){"use strict";n.r(t);var s=n(30137),r=n(76341),i=n(67462),l=n(98732),a=n(97582),o=n(85893),u=n(81458),c=n(67294),d=n(48528),f=n(65908),h=n(35222),m=n(14503),x=n(8163),y=n(32747),v=n(70416),p=n(49785);t.default=function(e){var t,n,b=(0,l._)((0,p.Oc)(),3),w=b[0],j=b[2].login,_=null==w?void 0:w.activeUser,N=(null==_?void 0:_.accountName)?null==w?void 0:w.activeUser.accountName:null,g=(0,l._)((0,c.useState)(!1),2),k=g[0],I=g[1],C=(0,l._)((0,c.useState)(!1),2),S=C[0],B=C[1],P=(0,l._)((0,c.useState)(null),2),W=P[0],q=P[1],E=(0,l._)((0,c.useState)(null),2),T=E[0],A=E[1],z=(0,l._)((0,c.useState)(null),2),F=z[0],R=z[1],Z=(t=(0,s._)(function(){var e,t,n,s,r,i,l,o,u,c,d,f,h,x;return(0,a.Jh)(this,function(a){switch(a.label){case 0:return e="search?owner=".concat(N,"&search_type=fucked&author=waxbullsclub&verified=all&limit=100000"),I(!0),[4,(0,m.ZP)(e)];case 1:t=a.sent(),n=[],s=!0,r=!1,i=void 0;try{for(l=t[Symbol.iterator]();!(s=(o=l.next()).done);s=!0)c=(u=o.value).assetId,d=u.resultId,f=u.name,h=u.image,x={assetId:c,resultId:d,name:f,image:h},n.push(x)}catch(e){r=!0,i=e}finally{try{s||null==l.return||l.return()}finally{if(r)throw i}}return R(n),I(!1),[2]}})}),function(){return t.apply(this,arguments)});(0,c.useEffect)(function(){N&&Z()},[N]);var D=(n=(0,s._)(function(e){var t,n,s,r,i,l,o,u;return(0,a.Jh)(this,function(a){switch(a.label){case 0:A(null),q(null),B(!0),t=[(0,y.vH)(_)],n={authorized_account:N,asset_ids:[e.assetId],from:N,to:"nfthivedrops",memo:"swap"},s={account:"atomicassets",name:"transfer",authorization:[{actor:N,permission:_.requestPermission?_.requestPermission:"active"}],data:n},t.push(s),r={owner:N,asset_id:e.assetId,result_id:e.resultId},i={account:"nfthivedrops",name:"swappfp",authorization:[{actor:N,permission:_.requestPermission?_.requestPermission:"active"}],data:r},t.push(i),l=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,_.session.transact({actions:t},{expireSeconds:300,blocksBehind:0})];case 2:return l=null===(u=a.sent())||void 0===u?void 0:null===(o=u.response)||void 0===o?void 0:o.transaction_id,[3,4];case 3:return A(a.sent().message),[3,4];case 4:return q(l),[4,(0,x._v)(2e3)];case 5:return a.sent(),B(!1),Z(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,o.jsxs)(v.Z,(0,i._)((0,r._)({banners:!1,id:"BrokenBullsPage",title:"Replace your broken bulls"},e),{children:[(0,o.jsx)("div",{className:"text-2xl text-center my-10",children:"Replace a broken NFT from the Wax Bulls Swag Club Collection"}),(0,o.jsxs)(d.C,{className:"flex justify-center",severity:"error",title:"Please Log In",condition:!N,children:["You need to be logged in so we can display any Bulls from your inventory."," ",(0,o.jsx)("span",{className:"text-primary hover:underline cursor-pointer",onClick:function(){return j()},children:"Click here to log in"})]}),(0,o.jsx)(d.C,{className:"flex justify-center",condition:N&&k,severity:"info",title:"Searching for broken Wax Bulls Swag Club Assets in your inventory...",children:(0,o.jsx)(u.Z,{})}),(0,o.jsx)(d.C,{className:"flex justify-center",condition:N&&S,severity:"info",title:"Swapping your Bull for a new one...",children:(0,o.jsx)(u.Z,{})}),(0,o.jsxs)(d.C,{className:"flex justify-center",condition:N&&!S&&!k&&(null==F?void 0:F.length)>0,severity:"info",title:"We found some broken Wax Bulls Swag Club Assets in your inventory!",children:["If you received an NFT with a broken image from the first Wax Bulls Swag Club Assets Drop, you can request to get a new, correct one here. Doing so will ",(0,o.jsx)("b",{children:"burn your existing NFT"}),", and we will mint a new one for you (with ",(0,o.jsx)("b",{children:"the same traits"})," ","as before)."]}),(0,o.jsx)(d.C,{className:"flex justify-center",condition:N&&!k&&(null==F?void 0:F.length)===0,severity:"info",title:"We couldn't find any broken Wax Bulls Swag Club Assets in your inventory!",children:"If you think this is a mistake, please reach out to us on telegram or discord."}),(0,o.jsx)(d.C,{className:"flex justify-center",severity:"success",condition:W,transactionId:W,title:"Swap successful!",children:"It can take a while for the new NFT to be minted and to appear in your inventory"}),(0,o.jsx)(d.C,{className:"flex justify-center",severity:"error",condition:T,title:"An error occured!",children:T}),(0,o.jsx)("div",{className:"flex flex-wrap justify-center",children:N&&!S&&!k&&(null==F?void 0:F.length)>0?F.map(function(e,t){return(0,o.jsxs)("div",{id:"bull_"+t,className:"m-3 p-3 border border-primary rounded-md",children:[(0,o.jsx)("img",{src:e.image,className:"h-48 w-48"}),(0,o.jsx)("div",{className:"text-center mt-3 font-bold",children:e.name}),(0,o.jsx)("div",{className:"flex justify-center",children:(0,o.jsx)(h.D,{href:"/asset/".concat(e.assetId),external:!0,className:"text-sm text-primary hover:underline",children:e.assetId})}),(0,o.jsx)("div",{className:"text-center mt-3 italic text-sm",children:e.resultId?"resultId: "+e.resultId:"Missing resultId!"}),(0,o.jsx)(f.h,{size:"small",className:"flex justify-center mt-3",disabled:!e.resultId,onClick:function(){return D(e)},children:"Request Replacement"})]})}):null})]}))}}},function(e){e.O(0,[5733,8802,7470,8426,9774,2888,179],function(){return e(e.s=30664)}),_N_E=e.O()}]); 2//# sourceMappingURL=brokenbulls-1cafd4f5726bcd52.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.