diff --git a/src/components/PositionListItem/index.tsx b/src/components/PositionListItem/index.tsx index ebfce2cc2d..68fc56c452 100644 --- a/src/components/PositionListItem/index.tsx +++ b/src/components/PositionListItem/index.tsx @@ -215,11 +215,7 @@ export default function PositionListItem({ const removed = liquidity?.eq(0) const containsURL = useMemo( - () => - [token0?.name, token0?.symbol, token1?.name, token1?.symbol].reduce( - (acc, testString) => acc || Boolean(testString && hasURL(testString)), - false - ), + () => [token0?.name, token0?.symbol, token1?.name, token1?.symbol].some((testString) => hasURL(testString)), [token0?.name, token0?.symbol, token1?.name, token1?.symbol] ) diff --git a/src/components/WalletDropdown/MiniPortfolio/Pools/index.tsx b/src/components/WalletDropdown/MiniPortfolio/Pools/index.tsx index c565cf5ed1..b932ae8c2f 100644 --- a/src/components/WalletDropdown/MiniPortfolio/Pools/index.tsx +++ b/src/components/WalletDropdown/MiniPortfolio/Pools/index.tsx @@ -11,6 +11,7 @@ import { useNavigate } from 'react-router-dom' import styled from 'styled-components/macro' import { ThemedText } from 'theme' import { switchChain } from 'utils/switchChain' +import { hasURL } from 'utils/urlChecks' import { ExpandoRow } from '../ExpandoRow' import { PortfolioLogo } from '../PortfolioLogo' @@ -98,6 +99,18 @@ function PositionListItem({ positionInfo }: { positionInfo: PositionInfo }) { navigate('/pool/' + details.tokenId) }, [walletChainId, chainId, connector, toggleWalletDrawer, navigate, details.tokenId]) + const containsURL = useMemo( + () => + [pool.token0.name, pool.token0.symbol, pool.token1.name, pool.token1.symbol].some((testString) => + hasURL(testString) + ), + [pool] + ) + + if (containsURL) { + return null + } + return (