mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* default TxEntity.noCopy to false remove redundant noCopy=false restore noCopy for tx hashes in this components This commit has no essential change, order than defaulting noCopy for TxEntity to false, and reversing the use of the prop * To reflect new default of TxEntity and UserOpEntity Updated tests to with-no-copy from with-copy remove outdated screenshots Regenerate screenshot for new default * display copy button for tx hash In the following pages: /txs, /internal-txs /token-transfers /address/txs, /address/token-transfers(tab) /deposits, /withdrawals /batches[id]/txs(tab) /advanced-filter * update snapshots * update snapshots
78 lines
2.4 KiB
TypeScript
78 lines
2.4 KiB
TypeScript
import BigNumber from 'bignumber.js';
|
|
import React from 'react';
|
|
|
|
import type { OptimisticL2DepositsItem } from 'types/api/optimisticL2';
|
|
|
|
import config from 'configs/app';
|
|
import { Skeleton } from 'toolkit/chakra/skeleton';
|
|
import { TableCell, TableRow } from 'toolkit/chakra/table';
|
|
import AddressEntityL1 from 'ui/shared/entities/address/AddressEntityL1';
|
|
import BlockEntityL1 from 'ui/shared/entities/block/BlockEntityL1';
|
|
import TxEntity from 'ui/shared/entities/tx/TxEntity';
|
|
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
|
|
import TimeWithTooltip from 'ui/shared/time/TimeWithTooltip';
|
|
|
|
const rollupFeature = config.features.rollup;
|
|
|
|
type Props = { item: OptimisticL2DepositsItem; isLoading?: boolean };
|
|
|
|
const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
|
|
|
|
if (!rollupFeature.isEnabled || rollupFeature.type !== 'optimistic') {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<TableRow>
|
|
<TableCell verticalAlign="middle">
|
|
<BlockEntityL1
|
|
number={ item.l1_block_number }
|
|
isLoading={ isLoading }
|
|
fontWeight={ 600 }
|
|
noIcon
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<TxEntity
|
|
isLoading={ isLoading }
|
|
hash={ item.l2_transaction_hash }
|
|
truncation="constant_long"
|
|
noIcon
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle" pr={ 12 }>
|
|
<TimeWithTooltip
|
|
timestamp={ item.l1_block_timestamp }
|
|
isLoading={ isLoading }
|
|
color="text.secondary"
|
|
display="inline-block"
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<TxEntityL1
|
|
isLoading={ isLoading }
|
|
hash={ item.l1_transaction_hash }
|
|
truncation="constant_long"
|
|
noIcon
|
|
noCopy
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle">
|
|
<AddressEntityL1
|
|
address={{ hash: item.l1_transaction_origin, name: '', is_contract: false, is_verified: false, ens_domain_name: null, implementations: null }}
|
|
isLoading={ isLoading }
|
|
truncation="constant"
|
|
noCopy
|
|
/>
|
|
</TableCell>
|
|
<TableCell verticalAlign="middle" isNumeric>
|
|
<Skeleton loading={ isLoading } color="text.secondary" display="inline-block">
|
|
<span>{ BigNumber(item.l2_transaction_gas_limit).toFormat() }</span>
|
|
</Skeleton>
|
|
</TableCell>
|
|
</TableRow>
|
|
);
|
|
};
|
|
|
|
export default OptimisticDepositsTableItem;
|