Commit 1c78a12c authored by tom's avatar tom

highlight similar addresses in the table views

parent e1cf276c
import React from 'react';
interface AddressHighlightProviderProps {
children: React.ReactNode;
}
interface TAddressHighlightContext {
highlightedAddress: string | null;
onMouseEnter: (event: React.MouseEvent) => void;
onMouseLeave: (event: React.MouseEvent) => void;
}
export const AddressHighlightContext = React.createContext<TAddressHighlightContext | null>(null);
export function AddressHighlightProvider({ children }: AddressHighlightProviderProps) {
const [ highlightedAddress, setHighlightedAddress ] = React.useState<string | null>(null);
const onMouseEnter = React.useCallback((event: React.MouseEvent) => {
// TODO @tom2drum add throttling
const hash = event.currentTarget.getAttribute('data-hash');
hash && setHighlightedAddress(hash);
}, []);
const onMouseLeave = React.useCallback(() => {
setHighlightedAddress(null);
}, []);
const value = React.useMemo(() => {
return {
highlightedAddress,
onMouseEnter,
onMouseLeave,
};
}, [ highlightedAddress, onMouseEnter, onMouseLeave ]);
return (
<AddressHighlightContext.Provider value={ value }>
{ children }
</AddressHighlightContext.Provider>
);
}
export function useAddressHighlightContext() {
const context = React.useContext(AddressHighlightContext);
if (context === undefined) {
return null;
}
return context;
}
...@@ -4,6 +4,7 @@ import React from 'react'; ...@@ -4,6 +4,7 @@ import React from 'react';
import type { InternalTransaction } from 'types/api/internalTransaction'; import type { InternalTransaction } from 'types/api/internalTransaction';
import config from 'configs/app'; import config from 'configs/app';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import { default as Thead } from 'ui/shared/TheadSticky'; import { default as Thead } from 'ui/shared/TheadSticky';
import AddressIntTxsTableItem from './AddressIntTxsTableItem'; import AddressIntTxsTableItem from './AddressIntTxsTableItem';
...@@ -16,6 +17,7 @@ interface Props { ...@@ -16,6 +17,7 @@ interface Props {
const AddressIntTxsTable = ({ data, currentAddress, isLoading }: Props) => { const AddressIntTxsTable = ({ data, currentAddress, isLoading }: Props) => {
return ( return (
<AddressHighlightProvider>
<Table variant="simple" size="sm"> <Table variant="simple" size="sm">
<Thead top={ 80 }> <Thead top={ 80 }>
<Tr> <Tr>
...@@ -41,6 +43,8 @@ const AddressIntTxsTable = ({ data, currentAddress, isLoading }: Props) => { ...@@ -41,6 +43,8 @@ const AddressIntTxsTable = ({ data, currentAddress, isLoading }: Props) => {
)) } )) }
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -83,6 +83,7 @@ const AddressIntTxsTableItem = ({ ...@@ -83,6 +83,7 @@ const AddressIntTxsTableItem = ({
isLoading={ isLoading } isLoading={ isLoading }
noLink={ isOut } noLink={ isOut }
noCopy={ isOut } noCopy={ isOut }
w="min-content"
/> />
</Td> </Td>
<Td px={ 0 } verticalAlign="middle"> <Td px={ 0 } verticalAlign="middle">
...@@ -98,6 +99,7 @@ const AddressIntTxsTableItem = ({ ...@@ -98,6 +99,7 @@ const AddressIntTxsTableItem = ({
isLoading={ isLoading } isLoading={ isLoading }
noLink={ isIn } noLink={ isIn }
noCopy={ isIn } noCopy={ isIn }
w="min-content"
/> />
) } ) }
</Td> </Td>
......
...@@ -6,6 +6,7 @@ import React from 'react'; ...@@ -6,6 +6,7 @@ import React from 'react';
import type { Block } from 'types/api/block'; import type { Block } from 'types/api/block';
import config from 'configs/app'; import config from 'configs/app';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import getNetworkValidatorTitle from 'lib/networks/getNetworkValidatorTitle'; import getNetworkValidatorTitle from 'lib/networks/getNetworkValidatorTitle';
import BlocksTableItem from 'ui/blocks/BlocksTableItem'; import BlocksTableItem from 'ui/blocks/BlocksTableItem';
import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice'; import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
...@@ -37,6 +38,7 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum ...@@ -37,6 +38,7 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum
(!isRollup && !config.UI.views.block.hiddenFields?.burnt_fees ? FEES_COL_WEIGHT : 0); (!isRollup && !config.UI.views.block.hiddenFields?.burnt_fees ? FEES_COL_WEIGHT : 0);
return ( return (
<AddressHighlightProvider>
<Table variant="simple" minWidth="1040px" size="md" fontWeight={ 500 }> <Table variant="simple" minWidth="1040px" size="md" fontWeight={ 500 }>
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
...@@ -74,6 +76,7 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum ...@@ -74,6 +76,7 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum
</AnimatePresence> </AnimatePresence>
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -4,6 +4,7 @@ import React from 'react'; ...@@ -4,6 +4,7 @@ import React from 'react';
import { route } from 'nextjs-routes'; import { route } from 'nextjs-routes';
import useApiQuery from 'lib/api/useApiQuery'; import useApiQuery from 'lib/api/useApiQuery';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import useIsMobile from 'lib/hooks/useIsMobile'; import useIsMobile from 'lib/hooks/useIsMobile';
import useNewTxsSocket from 'lib/hooks/useNewTxsSocket'; import useNewTxsSocket from 'lib/hooks/useNewTxsSocket';
import { TX } from 'stubs/tx'; import { TX } from 'stubs/tx';
...@@ -42,6 +43,7 @@ const LatestTransactions = () => { ...@@ -42,6 +43,7 @@ const LatestTransactions = () => {
/> />
))) } ))) }
</Box> </Box>
<AddressHighlightProvider>
<Box mb={ 4 } display={{ base: 'none', lg: 'block' }}> <Box mb={ 4 } display={{ base: 'none', lg: 'block' }}>
{ data.slice(0, txsCount).map(((tx, index) => ( { data.slice(0, txsCount).map(((tx, index) => (
<LatestTxsItem <LatestTxsItem
...@@ -51,6 +53,7 @@ const LatestTransactions = () => { ...@@ -51,6 +53,7 @@ const LatestTransactions = () => {
/> />
))) } ))) }
</Box> </Box>
</AddressHighlightProvider>
<Flex justifyContent="center"> <Flex justifyContent="center">
<LinkInternal fontSize="sm" href={ txsUrl }>View all transactions</LinkInternal> <LinkInternal fontSize="sm" href={ txsUrl }>View all transactions</LinkInternal>
</Flex> </Flex>
......
...@@ -35,7 +35,10 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => { ...@@ -35,7 +35,10 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
return ( return (
<Grid <Grid
gridTemplateColumns={ columnNum === 2 ? '3fr 2fr' : '3fr 2fr 150px' } gridTemplateColumns={{
lg: columnNum === 2 ? '3fr minmax(auto, 160px)' : '3fr minmax(auto, 160px) 150px',
xl: columnNum === 2 ? '3fr minmax(auto, 250px)' : '3fr minmax(auto, 250px) 150px',
}}
gridGap={ 8 } gridGap={ 8 }
width="100%" width="100%"
minW="700px" minW="700px"
...@@ -77,15 +80,16 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => { ...@@ -77,15 +80,16 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
</Flex> </Flex>
</Box> </Box>
</Flex> </Flex>
<Grid alignItems="center" alignSelf="flex-start" templateColumns="24px auto"> <Flex alignItems="center" alignSelf="flex-start">
<Icon <Icon
as={ rightArrowIcon } as={ rightArrowIcon }
boxSize={ 6 } boxSize={ 6 }
color="gray.500" color="gray.500"
transform="rotate(90deg)" transform="rotate(90deg)"
isLoading={ isLoading } isLoading={ isLoading }
flexShrink={ 0 }
/> />
<Box overflow="hidden" ml={ 1 }> <Box ml={ 1 } maxW="calc(100% - 24px)">
<AddressEntity <AddressEntity
isLoading={ isLoading } isLoading={ isLoading }
address={ tx.from } address={ tx.from }
...@@ -104,7 +108,7 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => { ...@@ -104,7 +108,7 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
/> />
) } ) }
</Box> </Box>
</Grid> </Flex>
<Box> <Box>
{ !config.UI.views.tx.hiddenFields?.value && ( { !config.UI.views.tx.hiddenFields?.value && (
<Skeleton isLoaded={ !isLoading } mb={ 2 }> <Skeleton isLoaded={ !isLoading } mb={ 2 }>
......
...@@ -3,6 +3,7 @@ import React from 'react'; ...@@ -3,6 +3,7 @@ import React from 'react';
import type { TokenTransfer } from 'types/api/tokenTransfer'; import type { TokenTransfer } from 'types/api/tokenTransfer';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice'; import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
import { default as Thead } from 'ui/shared/TheadSticky'; import { default as Thead } from 'ui/shared/TheadSticky';
import TokenTransferTableItem from 'ui/shared/TokenTransfer/TokenTransferTableItem'; import TokenTransferTableItem from 'ui/shared/TokenTransfer/TokenTransferTableItem';
...@@ -32,6 +33,7 @@ const TokenTransferTable = ({ ...@@ -32,6 +33,7 @@ const TokenTransferTable = ({
}: Props) => { }: Props) => {
return ( return (
<AddressHighlightProvider>
<Table variant="simple" size="sm" minW="950px"> <Table variant="simple" size="sm" minW="950px">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
...@@ -67,6 +69,7 @@ const TokenTransferTable = ({ ...@@ -67,6 +69,7 @@ const TokenTransferTable = ({
)) } )) }
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
import type { As } from '@chakra-ui/react'; import type { As } from '@chakra-ui/react';
import { Box, Flex, Skeleton, Tooltip, chakra, VStack } from '@chakra-ui/react'; import { Box, Flex, Skeleton, Tooltip, chakra, VStack, useColorModeValue } from '@chakra-ui/react';
import _omit from 'lodash/omit'; import _omit from 'lodash/omit';
import React from 'react'; import React from 'react';
...@@ -10,6 +10,7 @@ import { route } from 'nextjs-routes'; ...@@ -10,6 +10,7 @@ import { route } from 'nextjs-routes';
import iconSafe from 'icons/brands/safe.svg'; import iconSafe from 'icons/brands/safe.svg';
import iconContractVerified from 'icons/contract_verified.svg'; import iconContractVerified from 'icons/contract_verified.svg';
import iconContract from 'icons/contract.svg'; import iconContract from 'icons/contract.svg';
import { useAddressHighlightContext } from 'lib/contexts/addressHighlight';
import * as EntityBase from 'ui/shared/entities/base/components'; import * as EntityBase from 'ui/shared/entities/base/components';
import { getIconProps } from '../base/utils'; import { getIconProps } from '../base/utils';
...@@ -148,8 +149,32 @@ const AddressEntry = (props: EntityProps) => { ...@@ -148,8 +149,32 @@ const AddressEntry = (props: EntityProps) => {
const linkProps = _omit(props, [ 'className' ]); const linkProps = _omit(props, [ 'className' ]);
const partsProps = _omit(props, [ 'className', 'onClick' ]); const partsProps = _omit(props, [ 'className', 'onClick' ]);
const context = useAddressHighlightContext();
const highlightedBgColor = useColorModeValue('blue.50', 'blue.900');
const highlightedBorderColor = useColorModeValue('blue.200', 'blue.600');
return ( return (
<Container className={ props.className }> <Container
className={ props.className }
data-hash={ props.address.hash }
onMouseEnter={ context?.onMouseEnter }
onMouseLeave={ context?.onMouseLeave }
position="relative"
_before={ !props.isLoading && context?.highlightedAddress === props.address.hash ? {
content: `" "`,
position: 'absolute',
top: '-7px',
left: '-5px',
width: `calc(100% + ${ props.noCopy ? 10 : 5 }px)`,
height: 'calc(100% + 12px)',
borderRadius: 'base',
borderColor: highlightedBorderColor,
borderWidth: '1px',
borderStyle: 'dashed',
bgColor: highlightedBgColor,
zIndex: -1,
} : undefined }
>
<Icon { ...partsProps }/> <Icon { ...partsProps }/>
<Link { ...linkProps }> <Link { ...linkProps }>
<Content { ...partsProps }/> <Content { ...partsProps }/>
......
...@@ -32,14 +32,17 @@ export interface EntityBaseProps { ...@@ -32,14 +32,17 @@ export interface EntityBaseProps {
export interface ContainerBaseProps extends Pick<EntityBaseProps, 'className'> { export interface ContainerBaseProps extends Pick<EntityBaseProps, 'className'> {
children: React.ReactNode; children: React.ReactNode;
onMouseEnter?: (event: React.MouseEvent) => void;
onMouseLeave?: (event: React.MouseEvent) => void;
} }
const Container = chakra(({ className, children }: ContainerBaseProps) => { const Container = chakra(({ className, children, ...props }: ContainerBaseProps) => {
return ( return (
<Flex <Flex
className={ className } className={ className }
alignItems="center" alignItems="center"
minWidth={ 0 } // for content truncation - https://css-tricks.com/flexbox-truncated-text/ minWidth={ 0 } // for content truncation - https://css-tricks.com/flexbox-truncated-text/
{ ...props }
> >
{ children } { children }
</Flex> </Flex>
......
...@@ -5,6 +5,7 @@ import React from 'react'; ...@@ -5,6 +5,7 @@ import React from 'react';
import type { TokenInfo } from 'types/api/token'; import type { TokenInfo } from 'types/api/token';
import type { ResourceError } from 'lib/api/resources'; import type { ResourceError } from 'lib/api/resources';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import useIsMobile from 'lib/hooks/useIsMobile'; import useIsMobile from 'lib/hooks/useIsMobile';
import ActionBar from 'ui/shared/ActionBar'; import ActionBar from 'ui/shared/ActionBar';
import DataListDisplay from 'ui/shared/DataListDisplay'; import DataListDisplay from 'ui/shared/DataListDisplay';
...@@ -58,6 +59,7 @@ const TokenInventory = ({ inventoryQuery, tokenQuery, ownerFilter }: Props) => { ...@@ -58,6 +59,7 @@ const TokenInventory = ({ inventoryQuery, tokenQuery, ownerFilter }: Props) => {
const token = tokenQuery.data; const token = tokenQuery.data;
const content = items && token ? ( const content = items && token ? (
<AddressHighlightProvider>
<Grid <Grid
w="100%" w="100%"
columnGap={{ base: 3, lg: 6 }} columnGap={{ base: 3, lg: 6 }}
...@@ -73,6 +75,7 @@ const TokenInventory = ({ inventoryQuery, tokenQuery, ownerFilter }: Props) => { ...@@ -73,6 +75,7 @@ const TokenInventory = ({ inventoryQuery, tokenQuery, ownerFilter }: Props) => {
/> />
)) } )) }
</Grid> </Grid>
</AddressHighlightProvider>
) : null; ) : null;
return ( return (
......
...@@ -4,6 +4,7 @@ import React from 'react'; ...@@ -4,6 +4,7 @@ import React from 'react';
import type { TokenInfo } from 'types/api/token'; import type { TokenInfo } from 'types/api/token';
import type { TokenTransfer } from 'types/api/tokenTransfer'; import type { TokenTransfer } from 'types/api/tokenTransfer';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice'; import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
import { default as Thead } from 'ui/shared/TheadSticky'; import { default as Thead } from 'ui/shared/TheadSticky';
import TruncatedValue from 'ui/shared/TruncatedValue'; import TruncatedValue from 'ui/shared/TruncatedValue';
...@@ -24,6 +25,7 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket ...@@ -24,6 +25,7 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket
const tokenType = data[0].token.type; const tokenType = data[0].token.type;
return ( return (
<AddressHighlightProvider>
<Table variant="simple" size="sm" minW="950px"> <Table variant="simple" size="sm" minW="950px">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
...@@ -60,6 +62,7 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket ...@@ -60,6 +62,7 @@ const TokenTransferTable = ({ data, top, showSocketInfo, socketInfoAlert, socket
)) } )) }
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -67,6 +67,7 @@ const TokenTransferTableItem = ({ ...@@ -67,6 +67,7 @@ const TokenTransferTableItem = ({
truncation="constant" truncation="constant"
tokenHash={ token.address } tokenHash={ token.address }
my="5px" my="5px"
w="min-content"
/> />
</Td> </Td>
<Td px={ 0 }> <Td px={ 0 }>
...@@ -81,6 +82,7 @@ const TokenTransferTableItem = ({ ...@@ -81,6 +82,7 @@ const TokenTransferTableItem = ({
truncation="constant" truncation="constant"
tokenHash={ token.address } tokenHash={ token.address }
my="5px" my="5px"
w="min-content"
/> />
</Td> </Td>
{ (token.type === 'ERC-721' || token.type === 'ERC-1155') && ( { (token.type === 'ERC-721' || token.type === 'ERC-1155') && (
......
...@@ -5,6 +5,7 @@ import type { InternalTransaction } from 'types/api/internalTransaction'; ...@@ -5,6 +5,7 @@ import type { InternalTransaction } from 'types/api/internalTransaction';
import config from 'configs/app'; import config from 'configs/app';
import arrowIcon from 'icons/arrows/east.svg'; import arrowIcon from 'icons/arrows/east.svg';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import { default as Thead } from 'ui/shared/TheadSticky'; import { default as Thead } from 'ui/shared/TheadSticky';
import TxInternalsTableItem from 'ui/tx/internals/TxInternalsTableItem'; import TxInternalsTableItem from 'ui/tx/internals/TxInternalsTableItem';
import type { Sort, SortField } from 'ui/tx/internals/utils'; import type { Sort, SortField } from 'ui/tx/internals/utils';
...@@ -21,6 +22,7 @@ const TxInternalsTable = ({ data, sort, onSortToggle, top, isLoading }: Props) = ...@@ -21,6 +22,7 @@ const TxInternalsTable = ({ data, sort, onSortToggle, top, isLoading }: Props) =
const sortIconTransform = sort?.includes('asc') ? 'rotate(-90deg)' : 'rotate(90deg)'; const sortIconTransform = sort?.includes('asc') ? 'rotate(-90deg)' : 'rotate(90deg)';
return ( return (
<AddressHighlightProvider>
<Table variant="simple" size="sm"> <Table variant="simple" size="sm">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
...@@ -48,6 +50,7 @@ const TxInternalsTable = ({ data, sort, onSortToggle, top, isLoading }: Props) = ...@@ -48,6 +50,7 @@ const TxInternalsTable = ({ data, sort, onSortToggle, top, isLoading }: Props) =
)) } )) }
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -8,6 +8,7 @@ import React from 'react'; ...@@ -8,6 +8,7 @@ import React from 'react';
import type { TxStateChange } from 'types/api/txStateChanges'; import type { TxStateChange } from 'types/api/txStateChanges';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import { default as Thead } from 'ui/shared/TheadSticky'; import { default as Thead } from 'ui/shared/TheadSticky';
import TxStateTableItem from 'ui/tx/state/TxStateTableItem'; import TxStateTableItem from 'ui/tx/state/TxStateTableItem';
...@@ -19,6 +20,7 @@ interface Props { ...@@ -19,6 +20,7 @@ interface Props {
const TxStateTable = ({ data, isLoading, top }: Props) => { const TxStateTable = ({ data, isLoading, top }: Props) => {
return ( return (
<AddressHighlightProvider>
<Table variant="simple" minWidth="1000px" size="sm" w="100%"> <Table variant="simple" minWidth="1000px" size="sm" w="100%">
<Thead top={ top }> <Thead top={ top }>
<Tr> <Tr>
...@@ -34,6 +36,7 @@ const TxStateTable = ({ data, isLoading, top }: Props) => { ...@@ -34,6 +36,7 @@ const TxStateTable = ({ data, isLoading, top }: Props) => {
{ data.map((item, index) => <TxStateTableItem data={ item } key={ index } isLoading={ isLoading }/>) } { data.map((item, index) => <TxStateTableItem data={ item } key={ index } isLoading={ isLoading }/>) }
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -27,7 +27,8 @@ const TxStateTableItem = ({ data, isLoading }: Props) => { ...@@ -27,7 +27,8 @@ const TxStateTableItem = ({ data, isLoading }: Props) => {
address={ data.address } address={ data.address }
isLoading={ isLoading } isLoading={ isLoading }
truncation="constant" truncation="constant"
py="7px" my="7px"
w="min-content"
/> />
</Td> </Td>
<Td isNumeric><Box py="7px">{ before }</Box></Td> <Td isNumeric><Box py="7px">{ before }</Box></Td>
......
...@@ -6,6 +6,7 @@ import type { Transaction, TransactionsSortingField, TransactionsSortingValue } ...@@ -6,6 +6,7 @@ import type { Transaction, TransactionsSortingField, TransactionsSortingValue }
import config from 'configs/app'; import config from 'configs/app';
import rightArrowIcon from 'icons/arrows/east.svg'; import rightArrowIcon from 'icons/arrows/east.svg';
import { AddressHighlightProvider } from 'lib/contexts/addressHighlight';
import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice'; import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
import TheadSticky from 'ui/shared/TheadSticky'; import TheadSticky from 'ui/shared/TheadSticky';
...@@ -39,6 +40,7 @@ const TxsTable = ({ ...@@ -39,6 +40,7 @@ const TxsTable = ({
isLoading, isLoading,
}: Props) => { }: Props) => {
return ( return (
<AddressHighlightProvider>
<Table variant="simple" minWidth="950px" size="xs"> <Table variant="simple" minWidth="950px" size="xs">
<TheadSticky top={ top }> <TheadSticky top={ top }>
<Tr> <Tr>
...@@ -98,6 +100,7 @@ const TxsTable = ({ ...@@ -98,6 +100,7 @@ const TxsTable = ({
</AnimatePresence> </AnimatePresence>
</Tbody> </Tbody>
</Table> </Table>
</AddressHighlightProvider>
); );
}; };
......
...@@ -52,7 +52,8 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement, ...@@ -52,7 +52,8 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
noCopy={ isOut } noCopy={ isOut }
noLink={ isOut } noLink={ isOut }
truncation="constant" truncation="constant"
w="100%" w="min-content"
maxW="100%"
py="2px" py="2px"
/> />
); );
...@@ -64,7 +65,8 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement, ...@@ -64,7 +65,8 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
truncation="constant" truncation="constant"
noCopy={ isIn } noCopy={ isIn }
noLink={ isIn } noLink={ isIn }
w="100%" w="min-content"
maxW="100%"
py="2px" py="2px"
/> />
) : '-'; ) : '-';
...@@ -150,7 +152,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement, ...@@ -150,7 +152,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement,
isLoading={ isLoading } isLoading={ isLoading }
/> />
) } ) }
<VStack alignItems="start" overflow="hidden" ml={ 1 }> <VStack alignItems="start" ml={ 1 } w="calc(100% - 48px)">
{ addressFrom } { addressFrom }
{ addressTo } { addressTo }
</VStack> </VStack>
......
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