fix tests
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -63,7 +63,7 @@ test('erc1155 +@mobile', async({ mount }) => {
|
||||
<TestApp>
|
||||
<Box h={{ base: '134px', lg: '100px' }}/>
|
||||
<TokenTransfer
|
||||
token={{ ...tokenInfo, type: 'ERC-1155' }}
|
||||
token={{ ...tokenInfo, type: 'ERC-1155', symbol: tokenTransferMock.erc1155multiple.token.symbol }}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore:
|
||||
transfersQuery={{
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { TokenTransfer } from 'types/api/tokenTransfer';
|
||||
import eastArrowIcon from 'icons/arrows/east.svg';
|
||||
import transactionIcon from 'icons/transactions.svg';
|
||||
import useTimeAgoIncrement from 'lib/hooks/useTimeAgoIncrement';
|
||||
import trimTokenSymbol from 'lib/token/trimTokenSymbol';
|
||||
import Address from 'ui/shared/address/Address';
|
||||
import AddressIcon from 'ui/shared/address/AddressIcon';
|
||||
import AddressLink from 'ui/shared/address/AddressLink';
|
||||
@@ -69,14 +70,15 @@ const TokenTransferListItem = ({
|
||||
<AddressLink ml={ 2 } fontWeight="500" hash={ to.hash } type="address_token" tokenHash={ token.address }/>
|
||||
</Address>
|
||||
</Flex>
|
||||
{ value && (
|
||||
{ value && (token.type === 'ERC-20' || token.type === 'ERC-1155') && (
|
||||
<Flex columnGap={ 2 } w="100%">
|
||||
<Text fontWeight={ 500 } flexShrink={ 0 }>Value</Text>
|
||||
<Text variant="secondary">{ value }</Text>
|
||||
<Text>{ token.symbol }</Text>
|
||||
<Text>{ trimTokenSymbol(token.symbol) }</Text>
|
||||
</Flex>
|
||||
) }
|
||||
{ 'token_id' in total && <TokenTransferNft hash={ token.address } id={ total.token_id }/> }
|
||||
{ 'token_id' in total && (token.type === 'ERC-721' || token.type === 'ERC-1155') &&
|
||||
<TokenTransferNft hash={ token.address } id={ total.token_id }/> }
|
||||
</ListItemMobile>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ import React from 'react';
|
||||
import type { TokenInfo } from 'types/api/tokenInfo';
|
||||
import type { TokenTransfer } from 'types/api/tokenTransfer';
|
||||
|
||||
import trimTokenSymbol from 'lib/token/trimTokenSymbol';
|
||||
import SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
|
||||
import { default as Thead } from 'ui/shared/TheadSticky';
|
||||
import TokenTransferTableItem from 'ui/token/TokenTransfer/TokenTransferTableItem';
|
||||
@@ -28,7 +29,7 @@ const TokenTransferTable = ({ data, top, token, showSocketInfo, socketInfoAlert,
|
||||
<Th width="36px" px={ 0 }/>
|
||||
<Th width="218px" >To</Th>
|
||||
{ (token.type === 'ERC-721' || token.type === 'ERC-1155') && <Th width="20%" isNumeric={ token.type === 'ERC-721' }>Token ID</Th> }
|
||||
{ (token.type === 'ERC-20' || token.type === 'ERC-1155') && <Th width="20%" isNumeric>Value { token.symbol }</Th> }
|
||||
{ (token.type === 'ERC-20' || token.type === 'ERC-1155') && <Th width="20%" isNumeric>Value { trimTokenSymbol(token.symbol) }</Th> }
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 54 KiB |