import React from 'react'; import type { TokenInfo, TokenInstance } from 'types/api/token'; import type { TokenTransfer } from 'types/api/tokenTransfer'; import { AddressHighlightProvider } from 'lib/contexts/addressHighlight'; import { useMultichainContext } from 'lib/contexts/multichain'; import { hasTokenIds, hasTokenTransferValue, isConfidentialTokenType, isFungibleTokenType, NFT_TOKEN_TYPE_IDS } from 'lib/token/tokenTypes'; import { TableBody, TableColumnHeader, TableHeaderSticky, TableRoot, TableRow } from 'toolkit/chakra/table'; import { TruncatedText } from 'toolkit/components/truncation/TruncatedText'; import * as SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice'; import TimeFormatToggle from 'ui/shared/time/TimeFormatToggle'; import TokenTransferTableItem from 'ui/token/TokenTransfer/TokenTransferTableItem'; interface Props { data: Array; top: number; showSocketInfo: boolean; showSocketErrorAlert?: boolean; socketInfoNum?: number; tokenId?: string; isLoading?: boolean; token: TokenInfo; instance?: TokenInstance; } const TokenTransferTable = ({ data, top, showSocketInfo, showSocketErrorAlert, socketInfoNum, tokenId, isLoading, token, instance }: Props) => { const multichainContext = useMultichainContext(); const chainData = multichainContext?.chain; const tokenType = token.type; return ( { chainData && } Txn hash Method From/To { (NFT_TOKEN_TYPE_IDS.includes(tokenType)) && Token ID } { hasTokenTransferValue(tokenType) && ( ) } { showSocketInfo && ( ) } { data.map((item, index) => ( )) } ); }; export default React.memo(TokenTransferTable);