Commit c5e3774e authored by isstuev's avatar isstuev

remove dynamic truncation from tables

parent 6c5fcf9f
# Set of ENVs for zkevm (dev only)
# https://eth.blockscout.com/
# app configuration
NEXT_PUBLIC_APP_PROTOCOL=http
NEXT_PUBLIC_APP_HOST=localhost
NEXT_PUBLIC_APP_PORT=3000
# blockchain parameters
NEXT_PUBLIC_NETWORK_NAME='OP Goerli'
NEXT_PUBLIC_NETWORK_SHORT_NAME='OP Goerli'
NEXT_PUBLIC_NETWORK_ID=420
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE=validation
NEXT_PUBLIC_NETWORK_RPC_URL=https://goerli.optimism.io
# api configuration
NEXT_PUBLIC_API_HOST=optimism-goerli.blockscout.com
NEXT_PUBLIC_API_PORT=80
NEXT_PUBLIC_API_PROTOCOL=http
NEXT_PUBLIC_API_BASE_PATH=/
# ui config
## homepage
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
## sidebar
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/polygon-mainnet.json
## footer
## misc
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'Etherscan','baseUrl':'https://etherscan.io/','paths':{'tx':'/tx','address':'/address','token':'/token','block':'/block'}}]
# app features
NEXT_PUBLIC_APP_INSTANCE=local
NEXT_PUBLIC_APP_ENV=development
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0xf7d4972356e6ae44ae948d0cf19ef2beaf0e574c180997e969a2837da15e349d
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
# NEXT_PUBLIC_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_LOGOUT_URL=https://blockscoutcom.us.auth0.com/v2/logout
NEXT_PUBLIC_STATS_API_HOST=https://stats-eth-main.k8s.blockscout.com
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
# rollup
NEXT_PUBLIC_IS_OPTIMISTIC_L2_NETWORK=true
NEXT_PUBLIC_OPTIMISTIC_L2_WITHDRAWAL_URL=https://app.optimism.io/bridge/withdraw
NEXT_PUBLIC_L1_BASE_URL=https://eth-goerli.blockscout.com/
export default function shortenString(string: string | null) { export default function shortenString(string: string | null, charNumber = 8) {
if (!string) { if (!string) {
return ''; return '';
} }
if (string.length <= 7) { if (string.length <= charNumber - 1) {
return string; return string;
} }
return string.slice(0, 4) + '...' + string.slice(-4); return string.slice(0, charNumber - 4) + '...' + string.slice(-4);
} }
...@@ -43,6 +43,7 @@ const ERC20TokensTableItem = ({ ...@@ -43,6 +43,7 @@ const ERC20TokensTableItem = ({
<AddressEntity <AddressEntity
address={{ hash: token.address }} address={{ hash: token.address }}
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
noIcon noIcon
/> />
<AddressAddToWallet token={ token } ml={ 4 } isLoading={ isLoading } opacity="0"/> <AddressAddToWallet token={ token } ml={ 4 } isLoading={ isLoading } opacity="0"/>
......
...@@ -35,6 +35,7 @@ const AddressesListItem = ({ ...@@ -35,6 +35,7 @@ const AddressesListItem = ({
isLoading={ isLoading } isLoading={ isLoading }
fontWeight={ 700 } fontWeight={ 700 }
mr={ 2 } mr={ 2 }
truncation="constant"
/> />
<Skeleton isLoaded={ !isLoading } fontSize="sm" ml="auto" minW={ 6 } color="text_secondary"> <Skeleton isLoaded={ !isLoading } fontSize="sm" ml="auto" minW={ 6 } color="text_secondary">
<span>{ index }</span> <span>{ index }</span>
......
...@@ -63,6 +63,7 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => { ...@@ -63,6 +63,7 @@ const BlocksListItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<AddressEntity <AddressEntity
address={ data.miner } address={ data.miner }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
</Flex> </Flex>
) } ) }
......
...@@ -70,6 +70,7 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => { ...@@ -70,6 +70,7 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => {
<AddressEntity <AddressEntity
address={ data.miner } address={ data.miner }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
</Td> </Td>
) } ) }
......
...@@ -44,6 +44,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => { ...@@ -44,6 +44,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
hash={ item.l2_tx_hash } hash={ item.l2_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
truncation="constant_long"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
...@@ -59,6 +60,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => { ...@@ -59,6 +60,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
hash={ item.l1_tx_hash } hash={ item.l1_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
truncation="constant_long"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
...@@ -68,6 +70,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => { ...@@ -68,6 +70,7 @@ const OptimisticDepositsListItem = ({ item, isLoading }: Props) => {
address={{ hash: item.l1_tx_origin, name: '', is_contract: false, is_verified: false, implementation_name: '', ens_domain_name: null }} address={{ hash: item.l1_tx_origin, name: '', is_contract: false, is_verified: false, implementation_name: '', ens_domain_name: null }}
isLoading={ isLoading } isLoading={ isLoading }
noCopy noCopy
truncation="constant"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
......
...@@ -31,6 +31,7 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => { ...@@ -31,6 +31,7 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
fontWeight={ 600 } fontWeight={ 600 }
noIcon
/> />
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
...@@ -39,7 +40,8 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => { ...@@ -39,7 +40,8 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
hash={ item.l2_tx_hash } hash={ item.l2_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
truncation="constant" truncation="constant_long"
noIcon
/> />
</Td> </Td>
<Td verticalAlign="middle" pr={ 12 }> <Td verticalAlign="middle" pr={ 12 }>
...@@ -49,7 +51,8 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => { ...@@ -49,7 +51,8 @@ const OptimisticDepositsTableItem = ({ item, isLoading }: Props) => {
<TxEntityL1 <TxEntityL1
isLoading={ isLoading } isLoading={ isLoading }
hash={ item.l1_tx_hash } hash={ item.l1_tx_hash }
truncation="constant" truncation="constant_long"
noIcon
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
/> />
......
...@@ -32,7 +32,7 @@ const NameDomainHistoryListItem = ({ isLoading, transaction_hash: transactionHas ...@@ -32,7 +32,7 @@ const NameDomainHistoryListItem = ({ isLoading, transaction_hash: transactionHas
<> <>
<ListItemMobileGrid.Label isLoading={ isLoading }>From</ListItemMobileGrid.Label> <ListItemMobileGrid.Label isLoading={ isLoading }>From</ListItemMobileGrid.Label>
<ListItemMobileGrid.Value> <ListItemMobileGrid.Value>
<AddressEntity address={ fromAddress } isLoading={ isLoading }/> <AddressEntity address={ fromAddress } isLoading={ isLoading } truncation="constant"/>
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
</> </>
) } ) }
......
...@@ -25,7 +25,7 @@ const NameDomainHistoryTableItem = ({ isLoading, transaction_hash: transactionHa ...@@ -25,7 +25,7 @@ const NameDomainHistoryTableItem = ({ isLoading, transaction_hash: transactionHa
</Skeleton> </Skeleton>
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
{ fromAddress && <AddressEntity address={ fromAddress } isLoading={ isLoading }/> } { fromAddress && <AddressEntity address={ fromAddress } isLoading={ isLoading } truncation="constant"/> }
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
{ action && <Tag colorScheme="gray" isLoading={ isLoading }>{ action }</Tag> } { action && <Tag colorScheme="gray" isLoading={ isLoading }>{ action }</Tag> }
......
...@@ -8,7 +8,7 @@ import dayjs from 'lib/date/dayjs'; ...@@ -8,7 +8,7 @@ import dayjs from 'lib/date/dayjs';
import CopyToClipboard from 'ui/shared/CopyToClipboard'; import CopyToClipboard from 'ui/shared/CopyToClipboard';
import BlockEntityL2 from 'ui/shared/entities/block/BlockEntityL2'; import BlockEntityL2 from 'ui/shared/entities/block/BlockEntityL2';
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1'; import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic'; import HashStringShorten from 'ui/shared/HashStringShorten';
import ListItemMobileGrid from 'ui/shared/ListItemMobile/ListItemMobileGrid'; import ListItemMobileGrid from 'ui/shared/ListItemMobile/ListItemMobileGrid';
const rollupFeature = config.features.rollup; const rollupFeature = config.features.rollup;
...@@ -55,14 +55,15 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => { ...@@ -55,14 +55,15 @@ const OptimisticL2OutputRootsListItem = ({ item, isLoading }: Props) => {
hash={ item.l1_tx_hash } hash={ item.l1_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
truncation="constant_long"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
<ListItemMobileGrid.Label isLoading={ isLoading }>Output root</ListItemMobileGrid.Label> <ListItemMobileGrid.Label isLoading={ isLoading }>Output root</ListItemMobileGrid.Label>
<ListItemMobileGrid.Value> <ListItemMobileGrid.Value>
<Flex overflow="hidden" whiteSpace="nowrap" alignItems="center" w="100%" justifyContent="space-between"> <Flex overflow="hidden" whiteSpace="nowrap" alignItems="center" w="100%" justifyContent="start">
<Skeleton isLoaded={ !isLoading } color="text_secondary" w="calc(100% - 24px)"> <Skeleton isLoaded={ !isLoading } color="text_secondary">
<HashStringShortenDynamic hash={ item.output_root }/> <HashStringShorten hash={ item.output_root } type="long"/>
</Skeleton> </Skeleton>
<CopyToClipboard text={ item.output_root } isLoading={ isLoading }/> <CopyToClipboard text={ item.output_root } isLoading={ isLoading }/>
</Flex> </Flex>
......
...@@ -18,7 +18,7 @@ const OptimisticL2OutputRootsTable = ({ items, top, isLoading }: Props) => { ...@@ -18,7 +18,7 @@ const OptimisticL2OutputRootsTable = ({ items, top, isLoading }: Props) => {
<Table variant="simple" size="sm" minW="900px"> <Table variant="simple" size="sm" minW="900px">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
<Th width="140px">L2 output index</Th> <Th width="160px">L2 output index</Th>
<Th width="20%">Age</Th> <Th width="20%">Age</Th>
<Th width="20%">L2 block #</Th> <Th width="20%">L2 block #</Th>
<Th width="30%">L1 txn hash</Th> <Th width="30%">L1 txn hash</Th>
......
...@@ -8,7 +8,7 @@ import dayjs from 'lib/date/dayjs'; ...@@ -8,7 +8,7 @@ import dayjs from 'lib/date/dayjs';
import CopyToClipboard from 'ui/shared/CopyToClipboard'; import CopyToClipboard from 'ui/shared/CopyToClipboard';
import BlockEntityL2 from 'ui/shared/entities/block/BlockEntityL2'; import BlockEntityL2 from 'ui/shared/entities/block/BlockEntityL2';
import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1'; import TxEntityL1 from 'ui/shared/entities/tx/TxEntityL1';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic'; import HashStringShorten from 'ui/shared/HashStringShorten';
const rollupFeature = config.features.rollup; const rollupFeature = config.features.rollup;
...@@ -36,6 +36,7 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => { ...@@ -36,6 +36,7 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => {
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
fontWeight={ 600 } fontWeight={ 600 }
noIcon
/> />
</Td> </Td>
<Td verticalAlign="middle" pr={ 12 }> <Td verticalAlign="middle" pr={ 12 }>
...@@ -44,12 +45,14 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => { ...@@ -44,12 +45,14 @@ const OptimisticL2OutputRootsTableItem = ({ item, isLoading }: Props) => {
hash={ item.l1_tx_hash } hash={ item.l1_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
noIcon
truncation="constant_long"
/> />
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
<Flex overflow="hidden" whiteSpace="nowrap" w="100%" alignItems="center"> <Flex overflow="hidden" w="100%" alignItems="center">
<Skeleton isLoaded={ !isLoading } w="calc(100% - 36px)"> <Skeleton isLoaded={ !isLoading }>
<HashStringShortenDynamic hash={ item.output_root }/> <HashStringShorten hash={ item.output_root } type="long"/>
</Skeleton> </Skeleton>
<CopyToClipboard text={ item.output_root } ml={ 2 } isLoading={ isLoading }/> <CopyToClipboard text={ item.output_root } ml={ 2 } isLoading={ isLoading }/>
</Flex> </Flex>
......
...@@ -62,7 +62,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin ...@@ -62,7 +62,7 @@ const EntityTags = ({ className, data, tagsBefore = [], tagsAfter = [], isLoadin
} }
<Popover isOpen={ isOpen } onClose={ onClose } placement="bottom-start" isLazy> <Popover isOpen={ isOpen } onClose={ onClose } placement="bottom-start" isLazy>
<PopoverTrigger> <PopoverTrigger>
<Tag onClick={ onToggle }>+{ tags.length - 1 }</Tag> <Tag isLoading={ isLoading }onClick={ onToggle }>+{ tags.length - 1 }</Tag>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent w="240px"> <PopoverContent w="240px">
<PopoverBody > <PopoverBody >
......
...@@ -7,17 +7,19 @@ import shortenString from 'lib/shortenString'; ...@@ -7,17 +7,19 @@ import shortenString from 'lib/shortenString';
interface Props { interface Props {
hash: string; hash: string;
isTooltipDisabled?: boolean; isTooltipDisabled?: boolean;
type?: 'long' | 'short';
as?: As; as?: As;
} }
const HashStringShorten = ({ hash, isTooltipDisabled, as = 'span' }: Props) => { const HashStringShorten = ({ hash, isTooltipDisabled, as = 'span', type }: Props) => {
if (hash.length <= 8) { const charNumber = type === 'long' ? 16 : 8;
if (hash.length <= charNumber) {
return <chakra.span as={ as }>{ hash }</chakra.span>; return <chakra.span as={ as }>{ hash }</chakra.span>;
} }
return ( return (
<Tooltip label={ hash } isDisabled={ isTooltipDisabled }> <Tooltip label={ hash } isDisabled={ isTooltipDisabled }>
<chakra.span as={ as }>{ shortenString(hash) }</chakra.span> <chakra.span as={ as }>{ shortenString(hash, charNumber) }</chakra.span>
</Tooltip> </Tooltip>
); );
}; };
......
...@@ -25,7 +25,7 @@ interface Props { ...@@ -25,7 +25,7 @@ interface Props {
noIcon?: boolean; noIcon?: boolean;
} }
const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading, tokenHash = '', truncation, noIcon }: Props) => { const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading, tokenHash = '', noIcon }: Props) => {
const mode = useBreakpointValue( const mode = useBreakpointValue(
{ {
base: (typeof modeProp === 'object' ? modeProp.base : modeProp), base: (typeof modeProp === 'object' ? modeProp.base : modeProp),
...@@ -52,8 +52,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading ...@@ -52,8 +52,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
noCopy={ current === from.hash } noCopy={ current === from.hash }
noIcon={ noIcon } noIcon={ noIcon }
tokenHash={ tokenHash } tokenHash={ tokenHash }
truncation={ truncation } truncation="constant"
maxW={ truncation === 'constant' ? undefined : 'calc(100% - 28px)' } maxW="calc(100% - 28px)"
w="min-content" w="min-content"
/> />
</Flex> </Flex>
...@@ -65,8 +65,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading ...@@ -65,8 +65,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
noCopy={ current === to.hash } noCopy={ current === to.hash }
noIcon={ noIcon } noIcon={ noIcon }
tokenHash={ tokenHash } tokenHash={ tokenHash }
truncation={ truncation } truncation="constant"
maxW={ truncation === 'constant' ? undefined : 'calc(100% - 28px)' } maxW="calc(100% - 28px)"
w="min-content" w="min-content"
ml="28px" ml="28px"
/> />
...@@ -87,8 +87,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading ...@@ -87,8 +87,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
noCopy={ isOutgoing } noCopy={ isOutgoing }
noIcon={ noIcon } noIcon={ noIcon }
tokenHash={ tokenHash } tokenHash={ tokenHash }
truncation={ truncation } truncation="constant"
maxW={ truncation === 'constant' ? undefined : `calc(50% - ${ iconSizeWithMargins / 2 }px)` } maxW={ `calc(50% - ${ iconSizeWithMargins / 2 }px)` }
mr={ isOutgoing ? 4 : 2 } mr={ isOutgoing ? 4 : 2 }
/> />
<AddressFromToIcon <AddressFromToIcon
...@@ -103,8 +103,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading ...@@ -103,8 +103,8 @@ const AddressFromTo = ({ from, to, current, mode: modeProp, className, isLoading
noCopy={ current === to.hash } noCopy={ current === to.hash }
noIcon={ noIcon } noIcon={ noIcon }
tokenHash={ tokenHash } tokenHash={ tokenHash }
truncation={ truncation } truncation="constant"
maxW={ truncation === 'constant' ? undefined : `calc(50% - ${ iconSizeWithMargins / 2 }px)` } maxW={ `calc(50% - ${ iconSizeWithMargins / 2 }px)` }
ml={ 3 } ml={ 3 }
/> />
) } ) }
......
...@@ -13,7 +13,7 @@ import LinkInternal from 'ui/shared/LinkInternal'; ...@@ -13,7 +13,7 @@ import LinkInternal from 'ui/shared/LinkInternal';
import { getIconProps, type IconSize } from './utils'; import { getIconProps, type IconSize } from './utils';
export type Truncation = 'constant' | 'dynamic' | 'tail' | 'none'; export type Truncation = 'constant' | 'constant_long' | 'dynamic' | 'tail' | 'none';
export interface EntityBaseProps { export interface EntityBaseProps {
className?: string; className?: string;
...@@ -117,6 +117,14 @@ const Content = chakra(({ className, isLoading, asProp, text, truncation = 'dyna ...@@ -117,6 +117,14 @@ const Content = chakra(({ className, isLoading, asProp, text, truncation = 'dyna
const children = (() => { const children = (() => {
switch (truncation) { switch (truncation) {
case 'constant_long':
return (
<HashStringShorten
hash={ text }
as={ asProp }
type="long"
/>
);
case 'constant': case 'constant':
return ( return (
<HashStringShorten <HashStringShorten
......
...@@ -37,9 +37,9 @@ const StatusTag = ({ type, text, errorText, isLoading }: Props) => { ...@@ -37,9 +37,9 @@ const StatusTag = ({ type, text, errorText, isLoading }: Props) => {
return ( return (
<Tooltip label={ errorText }> <Tooltip label={ errorText }>
<Tag colorScheme={ colorScheme } display="inline-flex" isLoading={ isLoading }> <Tag colorScheme={ colorScheme } display="flex" isLoading={ isLoading } >
<IconSvg boxSize={ 2.5 } name={ icon } mr={ 2 }/> <IconSvg boxSize={ 2.5 } name={ icon } mr={ 2 } flexShrink={ 0 }/>
<TagLabel>{ text }</TagLabel> <TagLabel display="block">{ text }</TagLabel>
</Tag> </Tag>
</Tooltip> </Tooltip>
); );
......
...@@ -87,6 +87,7 @@ const TokensTableItem = ({ ...@@ -87,6 +87,7 @@ const TokensTableItem = ({
noIcon noIcon
fontSize="sm" fontSize="sm"
fontWeight={ 500 } fontWeight={ 500 }
truncation="constant"
/> />
<AddressAddToWallet <AddressAddToWallet
token={ token } token={ token }
......
...@@ -24,6 +24,7 @@ const TxStateListItem = ({ data, isLoading }: Props) => { ...@@ -24,6 +24,7 @@ const TxStateListItem = ({ data, isLoading }: Props) => {
<AddressEntity <AddressEntity
address={ data.address } address={ data.address }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
{ tag } { tag }
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
......
...@@ -72,7 +72,7 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => { ...@@ -72,7 +72,7 @@ const OptimisticL2TxnBatchesListItem = ({ item, isLoading }: Props) => {
hash={ hash } hash={ hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
/> />
)) } )) }
</VStack> </VStack>
......
...@@ -32,6 +32,7 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => { ...@@ -32,6 +32,7 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
fontWeight={ 600 } fontWeight={ 600 }
noIcon
/> />
</Td> </Td>
<Td> <Td>
...@@ -64,7 +65,8 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => { ...@@ -64,7 +65,8 @@ const OptimisticL2TxnBatchesTableItem = ({ item, isLoading }: Props) => {
hash={ hash } hash={ hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
noIcon
/> />
)) } )) }
</VStack> </VStack>
......
...@@ -69,7 +69,7 @@ const ZkEvmTxnBatchesListItem = ({ item, isLoading }: Props) => { ...@@ -69,7 +69,7 @@ const ZkEvmTxnBatchesListItem = ({ item, isLoading }: Props) => {
hash={ item.verify_tx_hash } hash={ item.verify_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
/> />
) : <Text>Pending</Text> } ) : <Text>Pending</Text> }
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
...@@ -82,7 +82,7 @@ const ZkEvmTxnBatchesListItem = ({ item, isLoading }: Props) => { ...@@ -82,7 +82,7 @@ const ZkEvmTxnBatchesListItem = ({ item, isLoading }: Props) => {
hash={ item.sequence_tx_hash } hash={ item.sequence_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
/> />
) : <Text>Pending</Text> } ) : <Text>Pending</Text> }
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
......
...@@ -15,15 +15,15 @@ type Props = { ...@@ -15,15 +15,15 @@ type Props = {
const TxnBatchesTable = ({ items, top, isLoading }: Props) => { const TxnBatchesTable = ({ items, top, isLoading }: Props) => {
return ( return (
<Table variant="simple" size="sm" minW="850px"> <Table variant="simple" size="sm" minW="1000px">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
<Th width="170px">Batch #</Th> <Th width="33%">Batch #</Th>
<Th width="150px">Status</Th> <Th width="33%">Status</Th>
<Th width="150px">Age</Th> <Th width="150px">Age</Th>
<Th width="170px">Txn count</Th> <Th width="150px">Txn count</Th>
<Th width="50%">Verify Tx Has</Th> <Th width="230px">Verify Tx Has</Th>
<Th width="50%">Sequence hash</Th> <Th width="230px">Sequence hash</Th>
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>
......
...@@ -32,6 +32,7 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => { ...@@ -32,6 +32,7 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
fontWeight={ 600 } fontWeight={ 600 }
noIcon
/> />
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
...@@ -59,7 +60,8 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => { ...@@ -59,7 +60,8 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
hash={ item.verify_tx_hash } hash={ item.verify_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
noIcon
/> />
) : <Text>Pending</Text> } ) : <Text>Pending</Text> }
</Td> </Td>
...@@ -70,7 +72,8 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => { ...@@ -70,7 +72,8 @@ const TxnBatchesTableItem = ({ item, isLoading }: Props) => {
hash={ item.sequence_tx_hash } hash={ item.sequence_tx_hash }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
maxW="100%" truncation="constant_long"
noIcon
/> />
) : <Text>Pending</Text> } ) : <Text>Pending</Text> }
</Td> </Td>
......
...@@ -49,7 +49,7 @@ const TxsListItem = ({ tx, isLoading, showBlockInfo, currentAddress, enableTimeI ...@@ -49,7 +49,7 @@ const TxsListItem = ({ tx, isLoading, showBlockInfo, currentAddress, enableTimeI
<TxEntity <TxEntity
isLoading={ isLoading } isLoading={ isLoading }
hash={ tx.hash } hash={ tx.hash }
truncation="constant" truncation="constant_long"
fontWeight="700" fontWeight="700"
/> />
{ tx.timestamp && ( { tx.timestamp && (
......
...@@ -55,6 +55,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement, ...@@ -55,6 +55,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
fontWeight={ 700 } fontWeight={ 700 }
noIcon noIcon
maxW="100%" maxW="100%"
truncation="constant"
/> />
{ tx.timestamp && <Skeleton color="text_secondary" fontWeight="400" isLoaded={ !isLoading }><span>{ timeAgo }</span></Skeleton> } { tx.timestamp && <Skeleton color="text_secondary" fontWeight="400" isLoaded={ !isLoading }><span>{ timeAgo }</span></Skeleton> }
</VStack> </VStack>
......
...@@ -28,7 +28,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => { ...@@ -28,7 +28,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => {
<ListItemMobileGrid.Label isLoading={ isLoading }>User op hash</ListItemMobileGrid.Label> <ListItemMobileGrid.Label isLoading={ isLoading }>User op hash</ListItemMobileGrid.Label>
<ListItemMobileGrid.Value> <ListItemMobileGrid.Value>
<UserOpEntity hash={ item.hash } isLoading={ isLoading } fontWeight="700" noIcon/> <UserOpEntity hash={ item.hash } isLoading={ isLoading } fontWeight="700" noIcon truncation="constant_long"/>
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
<ListItemMobileGrid.Label isLoading={ isLoading }>Age</ListItemMobileGrid.Label> <ListItemMobileGrid.Label isLoading={ isLoading }>Age</ListItemMobileGrid.Label>
...@@ -48,6 +48,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => { ...@@ -48,6 +48,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => {
<UserOpsAddress <UserOpsAddress
address={ item.address } address={ item.address }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
</> </>
...@@ -61,6 +62,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => { ...@@ -61,6 +62,7 @@ const UserOpsListItem = ({ item, isLoading, showTx, showSender }: Props) => {
hash={ item.transaction_hash } hash={ item.transaction_hash }
isLoading={ isLoading } isLoading={ isLoading }
noIcon noIcon
truncation="constant_long"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
</> </>
......
...@@ -18,7 +18,7 @@ import UserOpsTableItem from './UserOpsTableItem'; ...@@ -18,7 +18,7 @@ import UserOpsTableItem from './UserOpsTableItem';
const UserOpsTable = ({ items, isLoading, top, showTx, showSender }: Props) => { const UserOpsTable = ({ items, isLoading, top, showTx, showSender }: Props) => {
return ( return (
<Table variant="simple" size="sm"> <Table variant="simple" size="sm" minW="1000px">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
<Th w="60%">User op hash</Th> <Th w="60%">User op hash</Th>
......
...@@ -25,7 +25,7 @@ const UserOpsTableItem = ({ item, isLoading, showTx, showSender }: Props) => { ...@@ -25,7 +25,7 @@ const UserOpsTableItem = ({ item, isLoading, showTx, showSender }: Props) => {
return ( return (
<Tr> <Tr>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
<UserOpEntity hash={ item.hash } isLoading={ isLoading } noIcon fontWeight={ 700 }/> <UserOpEntity hash={ item.hash } isLoading={ isLoading } noIcon fontWeight={ 700 } truncation="constant_long"/>
</Td> </Td>
<Td verticalAlign="middle"> <Td verticalAlign="middle">
<Skeleton isLoaded={ !isLoading } color="text_secondary" display="inline-block"><span>{ timeAgo }</span></Skeleton> <Skeleton isLoaded={ !isLoading } color="text_secondary" display="inline-block"><span>{ timeAgo }</span></Skeleton>
......
...@@ -64,6 +64,7 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => { ...@@ -64,6 +64,7 @@ const BeaconChainWithdrawalsListItem = ({ item, isLoading, view }: Props) => {
<AddressEntity <AddressEntity
address={ item.receiver } address={ item.receiver }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
</> </>
......
...@@ -37,6 +37,7 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => { ...@@ -37,6 +37,7 @@ const BeaconChainWithdrawalsTableItem = ({ item, view, isLoading }: Props) => {
isLoading={ isLoading } isLoading={ isLoading }
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
noIcon
/> />
</Td> </Td>
) } ) }
......
...@@ -40,6 +40,7 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => { ...@@ -40,6 +40,7 @@ const OptimisticL2WithdrawalsListItem = ({ item, isLoading }: Props) => {
<AddressEntity <AddressEntity
address={ item.from } address={ item.from }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant"
/> />
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
</> </>
......
...@@ -40,9 +40,10 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => { ...@@ -40,9 +40,10 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
<TxEntity <TxEntity
isLoading={ isLoading } isLoading={ isLoading }
hash={ item.l2_tx_hash } hash={ item.l2_tx_hash }
truncation="constant"
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
truncation="constant_long"
noIcon
/> />
</Td> </Td>
<Td verticalAlign="middle" pr={ 12 }> <Td verticalAlign="middle" pr={ 12 }>
...@@ -61,7 +62,8 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => { ...@@ -61,7 +62,8 @@ const OptimisticL2WithdrawalsTableItem = ({ item, isLoading }: Props) => {
<TxEntityL1 <TxEntityL1
isLoading={ isLoading } isLoading={ isLoading }
hash={ item.l1_tx_hash } hash={ item.l1_tx_hash }
truncation="constant" truncation="constant_long"
noIcon
fontSize="sm" fontSize="sm"
lineHeight={ 5 } lineHeight={ 5 }
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment