Skip to content

Commit

Permalink
token transfers fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminaAiren committed Dec 14, 2023
1 parent 84ed9b9 commit b0507a2
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 b0507a2

Please sign in to comment.