diff --git a/src/components/PopularPools/Card/Card.tsx b/src/components/PopularPools/Card/Card.tsx index 9d49568b..cbed2403 100644 --- a/src/components/PopularPools/Card/Card.tsx +++ b/src/components/PopularPools/Card/Card.tsx @@ -7,7 +7,6 @@ import cardBackgroundBottom from '@static/png/cardBackground1.png' import cardBackgroundTop from '@static/png/cardBackground2.png' import icons from '@static/icons' import RevertIcon from '@static/svg/revert.svg' -import { shortenAddress } from '@utils/uiUtils' import StatsLabel from './StatsLabel/StatsLabel' import backIcon from '@static/svg/back-arrow-2.svg' import { addressToTicker, formatNumber, initialXtoY, parseFeeToPathFee } from '@utils/utils' @@ -66,6 +65,9 @@ const Card: React.FC = ({ ) } + const shortenAddressName = (address: string) => + address.length > 8 ? `${address.slice(0, 4)}...` : address + return ( {isLoading ? ( @@ -123,7 +125,7 @@ const Card: React.FC = ({ - {shortenAddress(symbolFrom ?? '')} - {shortenAddress(symbolTo ?? '')} + {shortenAddressName(symbolFrom ?? '')} - {shortenAddressName(symbolTo ?? '')} {apy !== undefined && showAPY && (