capture swap exceptions

This commit is contained in:
tjs 2023-07-12 12:31:08 -04:00
parent 1e720b586b
commit 3e6f6aa4d2
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import {
AddressLookupTableAccount,
} from '@solana/web3.js'
import Decimal from 'decimal.js'
import * as sentry from '@sentry/nextjs'
import mangoStore from '@store/mangoStore'
import Button, { IconButton } from '../shared/Button'
@ -313,6 +314,7 @@ const SwapReviewRouteInfo = ({
await actions.reloadMangoAccount()
} catch (e) {
console.error('onSwap error: ', e)
sentry.captureException(e)
if (isMangoError(e)) {
notify({
title: 'Transaction failed',