Commit ab509801 authored by isstuev's avatar isstuev Committed by tom goriunov

token transfer total is possibly null

parent a30c0fd6
...@@ -62,7 +62,7 @@ const TokenTransferListItem = ({ ...@@ -62,7 +62,7 @@ const TokenTransferListItem = ({
<TxAdditionalInfo hash={ txHash } isMobile isLoading={ isLoading }/> <TxAdditionalInfo hash={ txHash } isMobile isLoading={ isLoading }/>
) } ) }
</Flex> </Flex>
{ 'token_id' in total && total.token_id !== null && <NftEntity hash={ token.address } id={ total.token_id } isLoading={ isLoading }/> } { total && 'token_id' in total && total.token_id !== null && <NftEntity hash={ token.address } id={ total.token_id } isLoading={ isLoading }/> }
{ showTxInfo && txHash && ( { showTxInfo && txHash && (
<Flex justifyContent="space-between" alignItems="center" lineHeight="24px" width="100%"> <Flex justifyContent="space-between" alignItems="center" lineHeight="24px" width="100%">
<TxEntity <TxEntity
......
...@@ -66,7 +66,7 @@ const TokenTransferTableItem = ({ ...@@ -66,7 +66,7 @@ const TokenTransferTableItem = ({
</Flex> </Flex>
</Td> </Td>
<Td> <Td>
{ 'token_id' in total && total.token_id !== null && <NftEntity hash={ token.address } id={ total.token_id } isLoading={ isLoading }/> } { total && 'token_id' in total && total.token_id !== null && <NftEntity hash={ token.address } id={ total.token_id } isLoading={ isLoading }/> }
</Td> </Td>
{ showTxInfo && txHash && ( { showTxInfo && txHash && (
<Td> <Td>
......
...@@ -89,7 +89,7 @@ const TokenTransferListItem = ({ ...@@ -89,7 +89,7 @@ const TokenTransferListItem = ({
) } ) }
</Grid> </Grid>
) } ) }
{ 'token_id' in total && (NFT_TOKEN_TYPE_IDS.includes(token.type)) && total.token_id !== null && ( { total && 'token_id' in total && (NFT_TOKEN_TYPE_IDS.includes(token.type)) && total.token_id !== null && (
<NftEntity <NftEntity
hash={ token.address } hash={ token.address }
id={ total.token_id } id={ total.token_id }
......
...@@ -73,7 +73,7 @@ const TokenTransferTableItem = ({ ...@@ -73,7 +73,7 @@ const TokenTransferTableItem = ({
</Td> </Td>
{ (NFT_TOKEN_TYPE_IDS.includes(token.type)) && ( { (NFT_TOKEN_TYPE_IDS.includes(token.type)) && (
<Td> <Td>
{ 'token_id' in total && total.token_id !== null ? ( { total && 'token_id' in total && total.token_id !== null ? (
<NftEntity <NftEntity
hash={ token.address } hash={ token.address }
id={ total.token_id } id={ total.token_id }
......
...@@ -68,7 +68,7 @@ const TokenTransfersListItem = ({ item, isLoading }: Props) => { ...@@ -68,7 +68,7 @@ const TokenTransfersListItem = ({ item, isLoading }: Props) => {
<AddressEntity address={ item.to } isLoading={ isLoading } truncation="constant"/> <AddressEntity address={ item.to } isLoading={ isLoading } truncation="constant"/>
</ListItemMobileGrid.Value> </ListItemMobileGrid.Value>
{ 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null && ( { item.total && 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null && (
<> <>
<ListItemMobileGrid.Label isLoading={ isLoading }>Token ID</ListItemMobileGrid.Label> <ListItemMobileGrid.Label isLoading={ isLoading }>Token ID</ListItemMobileGrid.Label>
<ListItemMobileGrid.Value overflow="hidden"> <ListItemMobileGrid.Value overflow="hidden">
......
...@@ -62,7 +62,7 @@ const TokenTransferTableItem = ({ item, isLoading }: Props) => { ...@@ -62,7 +62,7 @@ const TokenTransferTableItem = ({ item, isLoading }: Props) => {
/> />
</Td> </Td>
<Td> <Td>
{ 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null ? ( { item.total && 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null ? (
<NftEntity <NftEntity
hash={ item.token.address } hash={ item.token.address }
id={ item.total.token_id } id={ item.total.token_id }
......
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