feat: log swap errors to sentry (#6698)
* feat: log swap errors to sentry * fix: dont stringify
This commit is contained in:
parent
41219b435f
commit
c45492c890
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user