diff --git a/src/components/ErrorBoundary/index.tsx b/src/components/ErrorBoundary/index.tsx index 691da4775f..1cee0f8277 100644 --- a/src/components/ErrorBoundary/index.tsx +++ b/src/components/ErrorBoundary/index.tsx @@ -1,13 +1,10 @@ import { Trans } from '@lingui/macro' import * as Sentry from '@sentry/react' -import { sendAnalyticsEvent } from '@uniswap/analytics' -import { SwapEventName } from '@uniswap/analytics-events' import { ButtonLight, SmallButtonPrimary } from 'components/Button' import { ChevronUpIcon } from 'nft/components/icons' import { useIsMobile } from 'nft/hooks' import React, { PropsWithChildren, useState } from 'react' import { Copy } from 'react-feather' -import { useLocation } from 'react-router-dom' import styled from 'styled-components/macro' import { isSentryEnabled } from 'utils/env' @@ -220,18 +217,14 @@ const updateServiceWorkerInBackground = async () => { } export default function ErrorBoundary({ children }: PropsWithChildren): JSX.Element { - const { pathname } = useLocation() return ( } beforeCapture={(scope) => { scope.setLevel('fatal') }} - onError={(error) => { + onError={() => { updateServiceWorkerInBackground() - if (pathname === '/swap') { - sendAnalyticsEvent(SwapEventName.SWAP_ERROR, { error }) - } }} > {children}