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:
parent
37da64aa7e
commit
1fb15a52bb
@ -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…
Reference in New Issue
Block a user