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 }, - }) -}