dappros/ethora

View on GitHub
client-web/build-prod/static/js/486.11607db6.chunk.js

Summary

Maintainability
A
0 mins
Test Coverage
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[486],{39486:function(e,t,n){n.r(t);var a=n(74165),r=n(15861),s=n(70885),i=n(72791),c=n(64880),o=n(47409),u=n(91482),l=n(45100),p=n(50228),m=n(4565),d=n(80184),f={blockNumber:"Block Number",blockHash:"Block Hash",from:"From",to:"To",gas:"Gas",gasPrice:"Gas Price",hash:"Hash",input:"Input",nonce:"Nonce",transactionIndex:"Transaction Index",value:"Value",type:"Type",timestamp:"Timestamp",tokenName:"Token Name",fromFirstName:"Sender First Name",fromLastName:"Sender Last Name",toLastName:"Receiver Last Name",toFirstName:"Receiver First Name"};t.default=function(e){var t=(0,i.useState)({}),n=(0,s.Z)(t,2),x=n[0],h=n[1],b=(0,i.useState)(!1),N=(0,s.Z)(b,2),j=N[0],k=N[1],v=(0,c.UO)(),Z=function(){var e=(0,r.Z)((0,a.Z)().mark((function e(){var t,n,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.prev=1,e.next=4,(0,o.oH)(v.txId);case 4:t=e.sent,n=t.data,r=Object.fromEntries(Object.entries(n).filter((function(e){return"input"!==e[0]})).map((function(e){return"timestamp"===e[0]&&(e[1]=(0,u.Z)(new Date(e[1]),"PPpp")),e}))),h(r),k(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(){return e.apply(this,arguments)}}();return(0,i.useEffect)((function(){null!==v&&void 0!==v&&v.txId&&Z()}),[v]),(0,d.jsx)(d.Fragment,{children:j?(0,d.jsx)(l.A,{}):(0,d.jsxs)(p.Z,{children:[(0,d.jsxs)(m.Z,{variant:"h4",style:{paddingInline:20,fontSize:25,paddingTop:20},children:["Transaction details ",v.txId]}),(0,d.jsx)(p.Z,{sx:{display:"flex",alignItems:"flex-start",flexDirection:"column",padding:"20px"},children:Object.entries(x).map((function(e){return(0,d.jsxs)(p.Z,{children:[(0,d.jsx)("span",{children:(0,d.jsxs)("b",{children:[f[e[0]]||e[0],": "]})}),(0,d.jsx)("span",{children:e[1]})]},e[0])}))})]})})}}}]);
//# sourceMappingURL=486.11607db6.chunk.js.map