1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Stop reporting failed transactions to Sentry (#8795)

These error reports are not useful.
This commit is contained in:
Mark Stacey 2020-06-12 16:41:57 -03:00 committed by GitHub
parent 37da64aa7e
commit 1fb15a52bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 28 deletions

View File

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

View File

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