diff --git a/src/pages/Swap/index.tsx b/src/pages/Swap/index.tsx index 4c6465439e..50fe79ed41 100644 --- a/src/pages/Swap/index.tsx +++ b/src/pages/Swap/index.tsx @@ -1,4 +1,5 @@ import { Trans } from '@lingui/macro' +import * as Sentry from '@sentry/react' import { sendAnalyticsEvent, Trace, TraceEvent, useTrace } from '@uniswap/analytics' import { BrowserEvent, @@ -440,6 +441,12 @@ export function Swap({ }) }) .catch((error) => { + if (!didUserReject(error)) { + Sentry.withScope((scope) => { + scope.setExtra('confirmedTrade', tradeToConfirm) + Sentry.captureException(error) + }) + } setSwapState((currentState) => ({ ...currentState, swapError: error, @@ -454,6 +461,7 @@ export function Swap({ account, trade?.inputAmount?.currency?.symbol, trade?.outputAmount?.currency?.symbol, + tradeToConfirm, ]) // errors