Files
explore/ui/tx/authorizations/TxAuthorizationsTableItem.tsx
tom goriunovandGitHub a76c14cac6 Migrate to the props with consistent full naming in the API for addre… (#2694)
* Migrate to the props with consistent full naming in the API for address hash entity and multiple props for L2-rollups

Fixes #2686

* fix test
2025-04-24 13:13:18 +02:00

38 lines
1.2 KiB
TypeScript

import React from 'react';
import type { TxAuthorization } from 'types/api/transaction';
import config from 'configs/app';
import { Skeleton } from 'toolkit/chakra/skeleton';
import { TableRow, TableCell } from 'toolkit/chakra/table';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
interface Props extends TxAuthorization {
isLoading?: boolean;
}
const TxAuthorizationsItem = ({ address_hash: addressHash, authority, chain_id: chainId, nonce, isLoading }: Props) => {
return (
<TableRow alignItems="top">
<TableCell>
<AddressEntity address={{ hash: addressHash }} isLoading={ isLoading } noIcon/>
</TableCell>
<TableCell verticalAlign="middle">
<AddressEntity address={{ hash: authority }} isLoading={ isLoading } noIcon/>
</TableCell>
<TableCell verticalAlign="middle">
<Skeleton loading={ isLoading } display="inline-block">
{ chainId === Number(config.chain.id) ? 'this' : 'any' }
</Skeleton>
</TableCell>
<TableCell isNumeric verticalAlign="middle">
<Skeleton loading={ isLoading } display="inline-block">
{ nonce }
</Skeleton>
</TableCell>
</TableRow>
);
};
export default React.memo(TxAuthorizationsItem);