Skip to content

Commit 923be92

Browse files
authored
fix: native token logo in transaction history (#2879)
1 parent 25769cc commit 923be92

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/kyberswap-interface/src/pages/CrossChainSwap/components/TokenLogoWithChain.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { ChainId, Currency as EvmCurrency } from '@kyberswap/ks-sdk-core'
12
import { Flex } from 'rebass'
23

3-
import { isEvmChain } from 'utils'
4+
import { getNativeTokenLogo, isEvmChain } from 'utils'
45

56
import { Chain, Currency } from '../adapters'
67
import { getNetworkInfo } from '../utils'
@@ -20,7 +21,9 @@ export const TokenLogoWithChain = ({
2021
<Flex sx={{ position: 'relative', marginRight: '4px' }}>
2122
{isEvmChain(chainId) ? (
2223
<img
23-
src={(currency as any)?.logoURI}
24+
src={
25+
(currency as EvmCurrency)?.isNative ? getNativeTokenLogo(chainId as ChainId) : (currency as any)?.logoURI
26+
}
2427
width={size}
2528
height={size}
2629
style={{ borderRadius: '50%' }}

0 commit comments

Comments
 (0)