import { Flex, Box } from '@chakra-ui/react'; import React from 'react'; import type { TokenInstance } from 'types/api/token'; import type { TokenTransfer } from 'types/api/tokenTransfer'; import type { ClusterChainConfig } from 'types/multichain'; import { hasTokenTransferValue, isConfidentialTokenType, NFT_TOKEN_TYPE_IDS } from 'lib/token/tokenTypes'; import { Badge } from 'toolkit/chakra/badge'; import { Skeleton } from 'toolkit/chakra/skeleton'; import { TableCell, TableRow } from 'toolkit/chakra/table'; import AddressFromTo from 'ui/shared/address/AddressFromTo'; import NftEntity from 'ui/shared/entities/nft/NftEntity'; import TxEntity from 'ui/shared/entities/tx/TxEntity'; import ChainIcon from 'ui/shared/externalChains/ChainIcon'; import TimeWithTooltip from 'ui/shared/time/TimeWithTooltip'; import AssetValue from 'ui/shared/value/AssetValue'; import ConfidentialValue from 'ui/shared/value/ConfidentialValue'; type Props = TokenTransfer & { tokenId?: string; isLoading?: boolean; instance?: TokenInstance; chainData?: ClusterChainConfig }; const TokenTransferTableItem = ({ token, total, transaction_hash: txHash, from, to, method, timestamp, tokenId, isLoading, instance, chainData, }: Props) => { return ( { chainData && ( ) } { txHash ? ( ) : - } { method ? ( { method } ) : null } { (token && NFT_TOKEN_TYPE_IDS.includes(token.type)) && ( { total && 'token_id' in total && token && total.token_id !== null ? ( ) : '' } ) } { token && (hasTokenTransferValue(token.type)) && ( { isConfidentialTokenType(token.type) ? ( ) : ( ) } ) } ); }; export default React.memo(TokenTransferTableItem);