dappros/ethora

View on GitHub
client-web/build-prod/static/js/460.bd933ae2.chunk.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[460],{18460:function(e,t,s){s.r(t),s.d(t,{default:function(){return T}});var n=s(74165),r=s(15861),a=s(70885),i=s(4942),d=s(72791),l=s(47409),o=s(11210),c=s(74142),p=s(20601),u=s(85847),h=s(82839),y=s(90466),x=s(12891),m=s(35667),f=s(24296),g=s(53628),j=s(80184),Z=function(e){var t=e.data,s=(0,c.Z)();return(0,j.jsx)(p.h,{height:"100%",children:(0,j.jsxs)(u.w,{width:500,height:300,data:t,margin:{top:5,right:30,left:20,bottom:5},children:[(0,j.jsx)(h.q,{strokeDasharray:"3 3"}),(0,j.jsx)(y.K,{dataKey:"date"}),(0,j.jsx)(x.B,{dataKey:"y"}),(0,j.jsx)(m.u,{}),(0,j.jsx)(f.D,{}),(0,j.jsx)(g.x,{type:"monotone",name:"Transactions",dataKey:"y",stroke:s.palette.primary.main,activeDot:{r:8}})]})})},b=s(45100),P=s(60277),v=s(50228),w=s(4565),L=s(79299),k=s(24177),N=(0,P.ZP)(v.Z)((function(e){var t=e.theme;return(0,i.Z)({width:"100vw",padding:20,display:"flex"},t.breakpoints.down("md"),{flexDirection:"column"})}));function T(){var e=(0,o.K)((function(e){return e.user})),t=(0,d.useState)({limit:0,offset:0,items:[],total:0}),s=(0,a.Z)(t,2),i=s[0],c=s[1],p=(0,d.useState)([]),u=(0,a.Z)(p,2),h=u[0],y=u[1],x=(0,d.useState)(!1),m=(0,a.Z)(x,2),f=m[0],g=m[1],P=(0,d.useState)({limit:0,offset:0,items:[],total:0}),T=(0,a.Z)(P,2),W=(T[0],T[1]),G=function(){var t=(0,r.Z)((0,n.Z)().mark((function t(){var s,r,a,i,d,o,p;return(0,n.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(!0),t.prev=1,t.next=4,(0,l.f1)(e.walletAddress);case 4:return s=t.sent,r=s.data,t.next=8,(0,l.lC)();case 8:return a=t.sent,i=a.data,t.next=12,(0,l.OQ)();case 12:d=t.sent,o=d.data,p=(0,k.F7)(i),y(p),c(r),W(o),t.next=23;break;case 20:t.prev=20,t.t0=t.catch(1),console.log(t.t0);case 23:g(!1);case 24:case"end":return t.stop()}}),t,null,[[1,20]])})));return function(){return t.apply(this,arguments)}}();return(0,d.useEffect)((function(){G()}),[]),f?(0,j.jsx)(b.A,{}):(0,j.jsxs)(v.Z,{children:[!!e.token&&(0,j.jsx)(N,{children:(0,j.jsx)(v.Z,{sx:{height:300,width:"100%"},children:(0,j.jsx)(Z,{data:h})})}),(0,j.jsx)(w.Z,{variant:"h6",sx:{margin:"16px"},children:"Transactions"}),(0,j.jsx)(L.P,{transactions:i.items})]})}},79299:function(e,t,s){s.d(t,{P:function(){return P}});var n=s(70885),r=s(74142),a=s(76132),i=s(19978),d=s(5682),l=s(73978),o=s(4346),c=s(50228),p=s(74244),u=s(45629),h=s(72791),y=s(57050),x=s(3395),m=s(69861),f=s(91482),g=s(11210),j=s(64880),Z=s(80184),b=function(e){var t=e.item,s=(0,r.Z)(),b=(0,g.K)((function(e){return e.user.walletAddress})),P=t.from===b,v=(0,h.useState)(!1),w=(0,n.Z)(v,2),L=w[0],k=w[1],N=(0,j.k6)();return t.fromFirstName?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a.ZP,{children:(0,Z.jsxs)(i.Z,{onClick:function(){return k((function(e){return!e}))},children:[(0,Z.jsx)(d.Z,{children:(0,Z.jsx)(l.Z,{style:{backgroundColor:s.palette.primary.main},children:(0,Z.jsx)("p",{children:t.fromFirstName.slice(0,2).toUpperCase()})})}),(0,Z.jsx)(o.Z,{primary:t.fromFirstName+" "+t.fromLastName,secondary:(0,f.Z)(new Date(t.timestamp),"pp PP")}),(0,Z.jsxs)(c.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:[P?(0,Z.jsx)(m.Z,{fontSize:"small",color:"error"}):(0,Z.jsx)(x.Z,{color:"success",fontSize:"small"}),(0,Z.jsx)("span",{children:t.value}),(0,Z.jsx)("img",{src:y,style:{width:20,height:20},alt:"coin"})]})]})},t.transactionHash),(0,Z.jsx)(p.Z,{in:L,timeout:"auto",unmountOnExit:!0,children:(0,Z.jsxs)(u.Z,{dense:!0,children:[(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Block Number:"})," ",t.blockNumber]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"From:"})," ",(0,Z.jsx)("span",{children:(0,Z.jsx)("span",{onClick:function(){return N.push("/explorer/address/"+t.from)},style:{textDecoration:"underline",cursor:"pointer"},children:t.from})})]})," ",(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"To:"}),(0,Z.jsx)("span",{onClick:function(){return N.push("/explorer/address/"+t.to)},style:{textDecoration:"underline",cursor:"pointer"},children:t.to})]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Sender First Name:"}),t.fromFirstName]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Sender Last Name:"}),t.fromLastName]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Timestamp:"})," ",(0,f.Z)(new Date(t.timestamp),"pp PP")]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Receiver First Name:"}),t.toFirstName]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Receiver Last Name:"}),t.toLastName]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Token Name:"}),t.tokenName]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Transaction Index:"}),t.transactionIndex]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Type:"}),t.type]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Value:"}),t.value]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Transaction Hash:"}),(0,Z.jsx)("span",{onClick:function(){return N.push("/explorer/transactions/"+t.transactionHash)},style:{textDecoration:"underline",cursor:"pointer"},children:t.transactionHash})]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"Token Id:"}),t.tokenId]}),(0,Z.jsxs)(a.ZP,{disablePadding:!0,disableGutters:!0,style:{paddingLeft:25},children:[(0,Z.jsx)("span",{style:{fontWeight:"bold"},children:"_id:"}),t._id]})]})})]}):null},P=function(e){var t=e.transactions;(0,r.Z)(),(0,g.K)((function(e){return e.user.walletAddress}));return console.log({transactions:t}),(0,Z.jsx)(u.Z,{sx:{width:"100%",bgcolor:"background.paper"},children:t.map((function(e){return(0,Z.jsx)(b,{item:e},e._id)}))})}},3395:function(e,t,s){var n=s(64836);t.Z=void 0;var r=n(s(45649)),a=s(80184),i=(0,r.default)((0,a.jsx)("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");t.Z=i},69861:function(e,t,s){var n=s(64836);t.Z=void 0;var r=n(s(45649)),a=s(80184),i=(0,r.default)((0,a.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");t.Z=i},4346:function(e,t,s){var n=s(4942),r=s(63366),a=s(87462),i=s(72791),d=s(28182),l=s(94419),o=s(4565),c=s(98826),p=s(85513),u=s(60277),h=s(29282),y=s(80184),x=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],m=(0,u.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:function(e,t){var s=e.ownerState;return[(0,n.Z)({},"& .".concat(h.Z.primary),t.primary),(0,n.Z)({},"& .".concat(h.Z.secondary),t.secondary),t.root,s.inset&&t.inset,s.primary&&s.secondary&&t.multiline,s.dense&&t.dense]}})((function(e){var t=e.ownerState;return(0,a.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),f=i.forwardRef((function(e,t){var s=(0,p.Z)({props:e,name:"MuiListItemText"}),n=s.children,u=s.className,f=s.disableTypography,g=void 0!==f&&f,j=s.inset,Z=void 0!==j&&j,b=s.primary,P=s.primaryTypographyProps,v=s.secondary,w=s.secondaryTypographyProps,L=(0,r.Z)(s,x),k=i.useContext(c.Z).dense,N=null!=b?b:n,T=v,W=(0,a.Z)({},s,{disableTypography:g,inset:Z,primary:!!N,secondary:!!T,dense:k}),G=function(e){var t=e.classes,s=e.inset,n=e.primary,r=e.secondary,a={root:["root",s&&"inset",e.dense&&"dense",n&&r&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,l.Z)(a,h.L,t)}(W);return null==N||N.type===o.Z||g||(N=(0,y.jsx)(o.Z,(0,a.Z)({variant:k?"body2":"body1",className:G.primary,component:null!=P&&P.variant?void 0:"span",display:"block"},P,{children:N}))),null==T||T.type===o.Z||g||(T=(0,y.jsx)(o.Z,(0,a.Z)({variant:"body2",className:G.secondary,color:"text.secondary",display:"block"},w,{children:T}))),(0,y.jsxs)(m,(0,a.Z)({className:(0,d.Z)(G.root,u),ownerState:W,ref:t},L,{children:[N,T]}))}));t.Z=f}}]);
//# sourceMappingURL=460.bd933ae2.chunk.js.map