mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
updated linea image for token and badge (#19717)
* updated linea image for token and badge * replaced hardcoded string with constant
This commit is contained in:
parent
48f61dcf61
commit
e9423be894
@ -29,6 +29,7 @@ import {
|
|||||||
MetaMetricsEventCategory,
|
MetaMetricsEventCategory,
|
||||||
MetaMetricsEventName,
|
MetaMetricsEventName,
|
||||||
} from '../../../../shared/constants/metametrics';
|
} from '../../../../shared/constants/metametrics';
|
||||||
|
import { LINEA_GOERLI_TOKEN_IMAGE_URL } from '../../../../shared/constants/network';
|
||||||
|
|
||||||
export const TokenListItem = ({
|
export const TokenListItem = ({
|
||||||
className,
|
className,
|
||||||
@ -44,6 +45,10 @@ export const TokenListItem = ({
|
|||||||
const dataTheme = document.documentElement.getAttribute('data-theme');
|
const dataTheme = document.documentElement.getAttribute('data-theme');
|
||||||
const trackEvent = useContext(MetaMetricsContext);
|
const trackEvent = useContext(MetaMetricsContext);
|
||||||
const chainId = useSelector(getCurrentChainId);
|
const chainId = useSelector(getCurrentChainId);
|
||||||
|
const badgeWrapperImage =
|
||||||
|
title === 'LineaETH' ? LINEA_GOERLI_TOKEN_IMAGE_URL : primaryTokenImage;
|
||||||
|
const badgeTokenImage =
|
||||||
|
title === 'LineaETH' ? LINEA_GOERLI_TOKEN_IMAGE_URL : tokenImage;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
@ -80,9 +85,9 @@ export const TokenListItem = ({
|
|||||||
<AvatarNetwork
|
<AvatarNetwork
|
||||||
size={Size.XS}
|
size={Size.XS}
|
||||||
name={tokenSymbol}
|
name={tokenSymbol}
|
||||||
src={primaryTokenImage}
|
src={badgeWrapperImage}
|
||||||
borderColor={
|
borderColor={
|
||||||
primaryTokenImage
|
badgeWrapperImage
|
||||||
? BorderColor.borderMuted
|
? BorderColor.borderMuted
|
||||||
: BorderColor.borderDefault
|
: BorderColor.borderDefault
|
||||||
}
|
}
|
||||||
@ -92,10 +97,12 @@ export const TokenListItem = ({
|
|||||||
>
|
>
|
||||||
<AvatarToken
|
<AvatarToken
|
||||||
name={tokenSymbol}
|
name={tokenSymbol}
|
||||||
src={tokenImage}
|
src={badgeTokenImage}
|
||||||
showHalo
|
showHalo
|
||||||
borderColor={
|
borderColor={
|
||||||
tokenImage ? BorderColor.transparent : BorderColor.borderDefault
|
badgeTokenImage
|
||||||
|
? BorderColor.transparent
|
||||||
|
: BorderColor.borderDefault
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</BadgeWrapper>
|
</BadgeWrapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user