Stop reporting failed transactions to Sentry (#8795)

These error reports are not useful.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 37da64aa7e
commit 1fb15a52bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      app/scripts/background.js
  2. 14
      app/scripts/lib/reportFailedTxToSentry.js

@ -30,7 +30,6 @@ import NotificationManager from './lib/notification-manager.js'
import MetamaskController from './metamask-controller' import MetamaskController from './metamask-controller'
import rawFirstTimeState from './first-time-state' import rawFirstTimeState from './first-time-state'
import setupSentry from './lib/setupSentry' import setupSentry from './lib/setupSentry'
import reportFailedTxToSentry from './lib/reportFailedTxToSentry'
import getFirstPreferredLangCode from './lib/get-first-preferred-lang-code' import getFirstPreferredLangCode from './lib/get-first-preferred-lang-code'
import getObjStructure from './lib/getObjStructure' import getObjStructure from './lib/getObjStructure'
import setupEnsIpfsResolver from './lib/ens-ipfs/setup' import setupEnsIpfsResolver from './lib/ens-ipfs/setup'
@ -253,19 +252,6 @@ function setupController (initState, initLangCode) {
provider: controller.provider, 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 // setup state persistence
pump( pump(
asStream(controller.store), asStream(controller.store),

@ -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 },
})
}
Loading…
Cancel
Save