Skip to content

Commit 732610d

Browse files
committed
fix: Fix transaction details (#78)
1 parent cdb763b commit 732610d

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

src/pages/transactions/details.tsx

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -278,41 +278,20 @@ const CallerContract = ({contract, desktop}: any) => {
278278

279279
const AddPkgContract = ({contract, desktop}: any) => {
280280
return (
281-
<>
282-
{Object.keys(contract.args.data).map(v => (
283-
<DLWrap desktop={desktop} key={v1()}>
284-
<dt>{v}</dt>
285-
<dd>
286-
<Badge>
287-
{v === 'Creator' ? (
288-
<Link href={`/accounts/${contract.creator_address}`} passHref>
289-
<FitContentA>
290-
<Text type="p4" color="blue">
291-
{contract.args.data[v] || '-'}
292-
</Text>
293-
</FitContentA>
294-
</Link>
295-
) : v === 'Path' ? (
296-
<Link href={`/realms/details?path=${contract.pkg_path}`} passHref>
297-
<FitContentA>
298-
<Text type="p4" color="blue">
299-
{contract.args.data[v] || '-'}
300-
</Text>
301-
</FitContentA>
302-
</Link>
303-
) : (
304-
<Text
305-
type="p4"
306-
color={'inherit'}
307-
className={ellipsisTextKey.includes(v) ? 'ellipsis' : ''}>
308-
{contract.args.data[v] || '-'}
309-
</Text>
310-
)}
311-
</Badge>
312-
</dd>
313-
</DLWrap>
314-
))}
315-
</>
281+
<DLWrap desktop={desktop} key={v1()}>
282+
<dt>Creator</dt>
283+
<dd>
284+
<Badge>
285+
<Link href={`/accounts/${contract?.creator_address}`} passHref>
286+
<FitContentA>
287+
<Text type="p4" color="blue">
288+
{contract?.args?.data?.Creator || '-'}
289+
</Text>
290+
</FitContentA>
291+
</Link>
292+
</Badge>
293+
</dd>
294+
</DLWrap>
316295
);
317296
};
318297

0 commit comments

Comments
 (0)