diff --git a/src/resources/assets/UserAssetsQuery.ts b/src/resources/assets/UserAssetsQuery.ts index cb66aa27b6d..0e31037fee5 100644 --- a/src/resources/assets/UserAssetsQuery.ts +++ b/src/resources/assets/UserAssetsQuery.ts @@ -19,11 +19,7 @@ import { } from '@/redux/data'; import store from '@/redux/store'; import { useQuery } from '@tanstack/react-query'; -import { - filterPositionsData, - hideTokensWithUrls, - parseAddressAsset, -} from './assets'; +import { filterPositionsData, parseAddressAsset } from './assets'; import { fetchHardhatBalances } from './hardhatAssets'; import { AddysAccountAssetsMeta, @@ -226,9 +222,6 @@ const fetchAndParseUserAssetsForChainIds = async ( parsedSuccessResults ); - // add tokens with URLs to hidden list - hideTokensWithUrls(parsedSuccessResults, address); - // update account empty state if (!isEmpty(parsedSuccessResults)) { saveAccountEmptyState(false, address, Network.mainnet); diff --git a/src/resources/assets/assets.ts b/src/resources/assets/assets.ts index 80e5f499859..be0ecbfa6e5 100644 --- a/src/resources/assets/assets.ts +++ b/src/resources/assets/assets.ts @@ -130,21 +130,3 @@ function addHiddenCoins(coins: string[], address: string) { dispatch(setHiddenCoins(newHiddenCoins)); storage.set(storageKey, JSON.stringify(newHiddenCoins)); } - -const getTokenUrlScams = (tokens: RainbowAddressAssets): string[] => - Object.values(tokens) - .filter( - asset => - ((asset?.name && isValidDomain(asset?.name.replaceAll(' ', ''))) || - (asset?.symbol && isValidDomain(asset.symbol))) && - !asset.isVerified - ) - .map(asset => asset.uniqueId); - -export const hideTokensWithUrls = ( - tokens: RainbowAddressAssets, - address: string -) => { - const tokensWithUrls = getTokenUrlScams(tokens); - addHiddenCoins(tokensWithUrls, address); -};