diff --git a/ui/components/app/wallet-overview/token-overview.js b/ui/components/app/wallet-overview/token-overview.js index 0820c946a..a605492b9 100644 --- a/ui/components/app/wallet-overview/token-overview.js +++ b/ui/components/app/wallet-overview/token-overview.js @@ -28,7 +28,6 @@ import { INVALID_ASSET_TYPE } from '../../../helpers/constants/error-keys'; import { showModal } from '../../../store/actions'; import { MetaMetricsContext } from '../../../contexts/metametrics'; import { - MetaMetricsContextProp, MetaMetricsEventCategory, MetaMetricsEventName, MetaMetricsSwapsEventSource, @@ -36,12 +35,7 @@ import { import { AssetType } from '../../../../shared/constants/transaction'; import useRamps from '../../../hooks/experiences/useRamps'; -import { - ButtonIcon, - ButtonIconSize, - Icon, - IconName, -} from '../../component-library'; +import { Icon, IconName } from '../../component-library'; import { IconColor } from '../../../helpers/constants/design-system'; import { getPortfolioUrl } from '../../../helpers/utils/portfolio'; @@ -93,34 +87,6 @@ const TokenOverview = ({ className, token }) => { displayValue={balanceToRender} suffix={token.symbol} /> - { - const portfolioUrl = getPortfolioUrl('', 'ext', metaMetricsId); - global.platform.openTab({ - url: portfolioUrl, - }); - trackEvent( - { - category: MetaMetricsEventCategory.Home, - event: MetaMetricsEventName.PortfolioLinkClicked, - properties: { - url: portfolioUrl, - }, - }, - { - contextPropsIntoEventProperties: [ - MetaMetricsContextProp.PageTitle, - ], - }, - ); - }} - /> {formattedFiatBalance ? ( { ); }); - it('should always show the Portfolio button', () => { - const mockToken = { - name: 'test', - isERC721: false, - address: '0x7ceb23fd6bc0add59e62ac25578270cff1B9f619', - symbol: 'test', - }; - const { queryByTestId } = renderWithProvider( - , - store, - ); - const portfolioButton = queryByTestId('home__portfolio-site'); - expect(portfolioButton).toBeInTheDocument(); - }); - - it('should open the Portfolio URI when clicking on Portfolio button', async () => { - const mockToken = { - name: 'test', - isERC721: false, - address: '0x7ceb23fd6bc0add59e62ac25578270cff1B9f619', - symbol: 'test', - }; - const { queryByTestId } = renderWithProvider( - , - store, - ); - - const portfolioButton = queryByTestId('home__portfolio-site'); - - expect(portfolioButton).toBeInTheDocument(); - expect(portfolioButton).not.toBeDisabled(); - - fireEvent.click(portfolioButton); - expect(openTabSpy).toHaveBeenCalledTimes(1); - - await waitFor(() => - expect(openTabSpy).toHaveBeenCalledWith({ - url: expect.stringContaining(`?metamaskEntry=ext`), - }), - ); - }); - it('should show the Bridge button if chain id and token are supported', async () => { const mockToken = { name: 'test',