From 1fb15a52bb42675bf8c6b11db30e2e156e9b3e02 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 12 Jun 2020 16:41:57 -0300 Subject: [PATCH] Stop reporting failed transactions to Sentry (#8795) These error reports are not useful. --- app/scripts/background.js | 14 -------------- app/scripts/lib/reportFailedTxToSentry.js | 14 -------------- 2 files changed, 28 deletions(-) delete mode 100644 app/scripts/lib/reportFailedTxToSentry.js diff --git a/app/scripts/background.js b/app/scripts/background.js index 653037a9d..beaeb78c3 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -30,7 +30,6 @@ import NotificationManager from './lib/notification-manager.js' import MetamaskController from './metamask-controller' import rawFirstTimeState from './first-time-state' import setupSentry from './lib/setupSentry' -import reportFailedTxToSentry from './lib/reportFailedTxToSentry' import getFirstPreferredLangCode from './lib/get-first-preferred-lang-code' import getObjStructure from './lib/getObjStructure' import setupEnsIpfsResolver from './lib/ens-ipfs/setup' @@ -253,19 +252,6 @@ function setupController (initState, initLangCode) { provider: controller.provider, }) - // report failed transactions to Sentry - controller.txController.on(`tx:status-update`, (txId, status) => { - if (status !== 'failed') { - return - } - const txMeta = controller.txController.txStateManager.getTx(txId) - try { - reportFailedTxToSentry({ sentry, txMeta }) - } catch (e) { - console.error(e) - } - }) - // setup state persistence pump( asStream(controller.store), diff --git a/app/scripts/lib/reportFailedTxToSentry.js b/app/scripts/lib/reportFailedTxToSentry.js deleted file mode 100644 index ecf832ce7..000000000 --- a/app/scripts/lib/reportFailedTxToSentry.js +++ /dev/null @@ -1,14 +0,0 @@ -import extractEthjsErrorMessage from './extractEthjsErrorMessage' - -// -// utility for formatting failed transaction messages -// for sending to sentry -// - -export default function reportFailedTxToSentry ({ sentry, txMeta }) { - const errorMessage = 'Transaction Failed: ' + extractEthjsErrorMessage(txMeta.err.message) - sentry.captureMessage(errorMessage, { - // "extra" key is required by Sentry - extra: { txMeta }, - }) -}