Skip to content

Commit

Permalink
Merge pull request #1421 from blockscout/fe-1412
Browse files Browse the repository at this point in the history
token transfers fix
  • Loading branch information
isstuev authored Dec 19, 2023
2 parents 43637f9 + b0507a2 commit 0f257b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions ui/token/TokenTransfer/TokenTransferListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, Skeleton } from '@chakra-ui/react';
import { Grid, Flex, Skeleton } from '@chakra-ui/react';
import React from 'react';

import type { TokenTransfer } from 'types/api/tokenTransfer';
Expand Down Expand Up @@ -72,16 +72,31 @@ const TokenTransferListItem = ({
/>
</Flex>
{ valueStr && (token.type === 'ERC-20' || token.type === 'ERC-1155') && (
<Flex columnGap={ 2 } w="100%">
<Grid gap={ 2 } templateColumns={ `1fr auto auto${ usd ? ' auto' : '' }` }>
<Skeleton isLoaded={ !isLoading } flexShrink={ 0 } fontWeight={ 500 }>
Value
</Skeleton>
<Skeleton isLoaded={ !isLoading } color="text_secondary">
<Skeleton
isLoaded={ !isLoading }
color="text_secondary"
wordBreak="break-all"
overflow="hidden"
flexGrow={ 1 }
>
<span>{ valueStr }</span>
</Skeleton>
{ token.symbol && <TruncatedValue isLoading={ isLoading } value={ token.symbol }/> }
{ usd && <Skeleton isLoaded={ !isLoading } color="text_secondary"><span>(${ usd })</span></Skeleton> }
</Flex>
{ usd && (
<Skeleton
isLoaded={ !isLoading }
color="text_secondary"
wordBreak="break-all"
overflow="hidden"
>
<span>(${ usd })</span>
</Skeleton>
) }
</Grid>
) }
{ 'token_id' in total && (token.type === 'ERC-721' || token.type === 'ERC-1155') && (
<NftEntity
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0f257b4

Please sign in to comment.