diff --git a/components/swap/SwapReviewRouteInfo.tsx b/components/swap/SwapReviewRouteInfo.tsx index 860a3f68..ab225ec1 100644 --- a/components/swap/SwapReviewRouteInfo.tsx +++ b/components/swap/SwapReviewRouteInfo.tsx @@ -565,6 +565,7 @@ const SwapReviewRouteInfo = ({ description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } } else { @@ -586,12 +587,14 @@ const SwapReviewRouteInfo = ({ title: 'Transaction failed', description: `${stringError} - please review route and click swap again`, type: 'error', + noSentry: true, }) } else { notify({ title: 'Transaction failed', description: `${stringError} - please try again`, type: 'error', + noSentry: true, }) } } diff --git a/components/swap/SwapTriggerOrders.tsx b/components/swap/SwapTriggerOrders.tsx index 9251c1b4..07ef666f 100644 --- a/components/swap/SwapTriggerOrders.tsx +++ b/components/swap/SwapTriggerOrders.tsx @@ -72,6 +72,7 @@ export const handleCancelTriggerOrder = async ( description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } } @@ -118,6 +119,7 @@ export const handleCancelAll = async ( description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } } diff --git a/components/trade/AdvancedTradeForm.tsx b/components/trade/AdvancedTradeForm.tsx index a01eaab2..54647dd3 100644 --- a/components/trade/AdvancedTradeForm.tsx +++ b/components/trade/AdvancedTradeForm.tsx @@ -807,6 +807,7 @@ const AdvancedTradeForm = () => { description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } finally { setPlacingOrder(false) diff --git a/components/trade/SpotMarketOrderSwapForm.tsx b/components/trade/SpotMarketOrderSwapForm.tsx index 6616c9e3..951ddafb 100644 --- a/components/trade/SpotMarketOrderSwapForm.tsx +++ b/components/trade/SpotMarketOrderSwapForm.tsx @@ -333,6 +333,7 @@ export default function SpotMarketOrderSwapForm() { description: t('swap:error-slippage-exceeded-desc'), txid: e?.txid, type: 'error', + noSentry: true, }) } else { notify({ @@ -340,6 +341,7 @@ export default function SpotMarketOrderSwapForm() { description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } } else { @@ -347,6 +349,7 @@ export default function SpotMarketOrderSwapForm() { title: 'Transaction failed', description: `${e} - please try again`, type: 'error', + noSentry: true, }) } } finally { diff --git a/utils/notifications.ts b/utils/notifications.ts index f20b2a43..732c4481 100644 --- a/utils/notifications.ts +++ b/utils/notifications.ts @@ -39,6 +39,7 @@ export function notify(newNotification: { txid?: string noSound?: boolean noMangoIdlEnrichment?: boolean + noSentry?: boolean }) { const setMangoStore = mangoStore.getState().set const notifications = mangoStore.getState().transactionNotifications @@ -48,7 +49,7 @@ export function notify(newNotification: { const soundSettings = savedSoundSettings ? JSON.parse(savedSoundSettings) : INITIAL_SOUND_SETTINGS - if (newNotification.type === 'error') { + if (newNotification.type === 'error' && !newNotification.noSentry) { sentry.captureException( { title: newNotification.title, diff --git a/utils/tradeForm.ts b/utils/tradeForm.ts index e4ae4581..98343dd7 100644 --- a/utils/tradeForm.ts +++ b/utils/tradeForm.ts @@ -189,6 +189,7 @@ export const handlePlaceTriggerOrder = async ( description: e.message, txid: e?.txid, type: 'error', + noSentry: true, }) } }