Commit ca351cf1 authored by isstuev's avatar isstuev

no - in cells

parent b4b90cc4
...@@ -42,13 +42,13 @@ const TokensTableItem = ({ ...@@ -42,13 +42,13 @@ const TokensTableItem = ({
</Flex> </Flex>
</Td> </Td>
<Td isNumeric verticalAlign="middle"> <Td isNumeric verticalAlign="middle">
{ token.exchange_rate ? `$${ token.exchange_rate }` : '-' } { token.exchange_rate && `$${ token.exchange_rate }` }
</Td> </Td>
<Td isNumeric verticalAlign="middle"> <Td isNumeric verticalAlign="middle">
{ tokenQuantity } { tokenQuantity }
</Td> </Td>
<Td isNumeric verticalAlign="middle"> <Td isNumeric verticalAlign="middle">
{ tokenValue ? `$${ tokenValue }` : '-' } { tokenValue && `$${ tokenValue }` }
</Td> </Td>
</Tr> </Tr>
); );
......
...@@ -18,7 +18,7 @@ import LinkInternal from 'ui/shared/LinkInternal'; ...@@ -18,7 +18,7 @@ import LinkInternal from 'ui/shared/LinkInternal';
const WithdrawalsTableItem = ({ item }: Props) => { const WithdrawalsTableItem = ({ item }: Props) => {
const timeAgo = item.l2_timestamp ? dayjs(item.l2_timestamp).fromNow() : 'N/A'; const timeAgo = item.l2_timestamp ? dayjs(item.l2_timestamp).fromNow() : 'N/A';
const timeToEnd = item.challenge_period_end ? dayjs(item.challenge_period_end).fromNow(true) + ' left' : '-'; const timeToEnd = item.challenge_period_end ? dayjs(item.challenge_period_end).fromNow(true) + ' left' : '';
return ( return (
<Tr> <Tr>
......
...@@ -32,14 +32,6 @@ const TokenTransferTableItem = ({ ...@@ -32,14 +32,6 @@ const TokenTransferTableItem = ({
timestamp, timestamp,
enableTimeIncrement, enableTimeIncrement,
}: Props) => { }: Props) => {
const value = (() => {
if (!('value' in total)) {
return '-';
}
return BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat();
})();
const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement); const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement);
return ( return (
...@@ -57,7 +49,7 @@ const TokenTransferTableItem = ({ ...@@ -57,7 +49,7 @@ const TokenTransferTableItem = ({
</Flex> </Flex>
</Td> </Td>
<Td lineHeight="30px"> <Td lineHeight="30px">
{ 'token_id' in total ? <TokenTransferNft hash={ token.address } id={ total.token_id }/> : '-' } { 'token_id' in total && <TokenTransferNft hash={ token.address } id={ total.token_id }/> }
</Td> </Td>
{ showTxInfo && txHash && ( { showTxInfo && txHash && (
<Td> <Td>
...@@ -85,7 +77,7 @@ const TokenTransferTableItem = ({ ...@@ -85,7 +77,7 @@ const TokenTransferTableItem = ({
</Address> </Address>
</Td> </Td>
<Td isNumeric verticalAlign="top" lineHeight="30px"> <Td isNumeric verticalAlign="top" lineHeight="30px">
{ value } { 'value' in total && BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat() }
</Td> </Td>
</Tr> </Tr>
); );
......
...@@ -23,14 +23,6 @@ const TokenTransferTableItem = ({ ...@@ -23,14 +23,6 @@ const TokenTransferTableItem = ({
timestamp, timestamp,
tokenId, tokenId,
}: Props) => { }: Props) => {
const value = (() => {
if (!('value' in total)) {
return '-';
}
return BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat();
})();
const timeAgo = useTimeAgoIncrement(timestamp, true); const timeAgo = useTimeAgoIncrement(timestamp, true);
return ( return (
...@@ -44,7 +36,7 @@ const TokenTransferTableItem = ({ ...@@ -44,7 +36,7 @@ const TokenTransferTableItem = ({
</Grid> </Grid>
</Td> </Td>
<Td> <Td>
{ method ? <Tag colorScheme="gray">{ method }</Tag> : '-' } { method && <Tag colorScheme="gray">{ method }</Tag> }
</Td> </Td>
<Td> <Td>
<Address display="inline-flex" maxW="100%" lineHeight="30px"> <Address display="inline-flex" maxW="100%" lineHeight="30px">
...@@ -88,13 +80,13 @@ const TokenTransferTableItem = ({ ...@@ -88,13 +80,13 @@ const TokenTransferTableItem = ({
justifyContent={ token.type === 'ERC-721' ? 'end' : 'start' } justifyContent={ token.type === 'ERC-721' ? 'end' : 'start' }
isDisabled={ Boolean(tokenId && tokenId === total.token_id) } isDisabled={ Boolean(tokenId && tokenId === total.token_id) }
/> />
) : '-' ) : ''
} }
</Td> </Td>
) } ) }
{ (token.type === 'ERC-20' || token.type === 'ERC-1155') && ( { (token.type === 'ERC-20' || token.type === 'ERC-1155') && (
<Td isNumeric verticalAlign="top" lineHeight="30px"> <Td isNumeric verticalAlign="top" lineHeight="30px">
{ value || '-' } { 'value' in total && BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat() }
</Td> </Td>
) } ) }
</Tr> </Tr>
......
...@@ -66,7 +66,7 @@ const TokensTableItem = ({ ...@@ -66,7 +66,7 @@ const TokensTableItem = ({
{ exchangeRate && ( { exchangeRate && (
<HStack spacing={ 3 }> <HStack spacing={ 3 }>
<Text fontSize="sm" fontWeight={ 500 }>Price</Text> <Text fontSize="sm" fontWeight={ 500 }>Price</Text>
<Text fontSize="sm" variant="secondary">{ exchangeRate || '-' }</Text> <Text fontSize="sm" variant="secondary">{ exchangeRate }</Text>
</HStack> </HStack>
) } ) }
{ totalValue?.usd && ( { totalValue?.usd && (
......
...@@ -67,9 +67,9 @@ const TokensTableItem = ({ ...@@ -67,9 +67,9 @@ const TokensTableItem = ({
</Box> </Box>
</Flex> </Flex>
</Td> </Td>
<Td isNumeric><Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ exchangeRate ? `$${ exchangeRate }` : '-' }</Text></Td> <Td isNumeric><Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ exchangeRate && `$${ exchangeRate }` }</Text></Td>
<Td isNumeric maxWidth="300px" width="300px"> <Td isNumeric maxWidth="300px" width="300px">
<Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ totalValue?.usd ? `$${ totalValue.usd }` : '-' }</Text> <Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ totalValue?.usd && `$${ totalValue.usd }` }</Text>
</Td> </Td>
<Td isNumeric><Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ Number(holders).toLocaleString() }</Text></Td> <Td isNumeric><Text fontSize="sm" lineHeight="24px" fontWeight={ 500 }>{ Number(holders).toLocaleString() }</Text></Td>
</Tr> </Tr>
......
...@@ -88,13 +88,13 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement } ...@@ -88,13 +88,13 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }
</VStack> </VStack>
</Td> </Td>
<Td whiteSpace="nowrap"> <Td whiteSpace="nowrap">
{ tx.method ? ( { tx.method && (
<TruncatedTextTooltip label={ tx.method }> <TruncatedTextTooltip label={ tx.method }>
<Tag colorScheme={ tx.method === 'Multicall' ? 'teal' : 'gray' }> <Tag colorScheme={ tx.method === 'Multicall' ? 'teal' : 'gray' }>
{ tx.method } { tx.method }
</Tag> </Tag>
</TruncatedTextTooltip> </TruncatedTextTooltip>
) : '-' } ) }
</Td> </Td>
{ showBlockInfo && ( { showBlockInfo && (
<Td> <Td>
......
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