Skip to content

Commit

Permalink
fix: Fix transaction details (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss committed Jul 31, 2023
1 parent cdb763b commit 732610d
Showing 1 changed file with 14 additions and 35 deletions.
49 changes: 14 additions & 35 deletions src/pages/transactions/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,41 +278,20 @@ const CallerContract = ({contract, desktop}: any) => {

const AddPkgContract = ({contract, desktop}: any) => {
return (
<>
{Object.keys(contract.args.data).map(v => (
<DLWrap desktop={desktop} key={v1()}>
<dt>{v}</dt>
<dd>
<Badge>
{v === 'Creator' ? (
<Link href={`/accounts/${contract.creator_address}`} passHref>
<FitContentA>
<Text type="p4" color="blue">
{contract.args.data[v] || '-'}
</Text>
</FitContentA>
</Link>
) : v === 'Path' ? (
<Link href={`/realms/details?path=${contract.pkg_path}`} passHref>
<FitContentA>
<Text type="p4" color="blue">
{contract.args.data[v] || '-'}
</Text>
</FitContentA>
</Link>
) : (
<Text
type="p4"
color={'inherit'}
className={ellipsisTextKey.includes(v) ? 'ellipsis' : ''}>
{contract.args.data[v] || '-'}
</Text>
)}
</Badge>
</dd>
</DLWrap>
))}
</>
<DLWrap desktop={desktop} key={v1()}>
<dt>Creator</dt>
<dd>
<Badge>
<Link href={`/accounts/${contract?.creator_address}`} passHref>
<FitContentA>
<Text type="p4" color="blue">
{contract?.args?.data?.Creator || '-'}
</Text>
</FitContentA>
</Link>
</Badge>
</dd>
</DLWrap>
);
};

Expand Down

0 comments on commit 732610d

Please sign in to comment.