diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-01-23 08:07:58 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-01-23 08:08:14 +0800 |
commit | 022b12549503ee6fa2f7ffcc09c63909ae72a4a8 (patch) | |
tree | d82cd9180a0b1e5de97d5fbdf4281f120463bbb8 /app | |
parent | 5568053cd81d26f1888239d335708cd746f224df (diff) | |
parent | b1c34639f8d66523815c6e4c8ad921eb09c99322 (diff) | |
download | tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar.gz tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar.bz2 tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar.lz tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar.xz tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.tar.zst tangerine-wallet-browser-022b12549503ee6fa2f7ffcc09c63909ae72a4a8.zip |
Merge remote-tracking branch 'origin/master' into Version-3.13.7
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/background.js | 12 | ||||
-rw-r--r-- | app/scripts/setupRaven.js | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 8c1252d3e..0471cee3b 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -27,7 +27,7 @@ global.METAMASK_NOTIFIER = notificationManager // setup sentry error reporting const release = platform.getVersion() -setupRaven({ release }) +const raven = setupRaven({ release }) let popupIsOpen = false @@ -77,6 +77,16 @@ function setupController (initState) { }) global.metamaskController = controller + // report failed transactions to Sentry + controller.txController.on(`tx:status-update`, (txId, status) => { + if (status !== 'failed') return + const txMeta = controller.txController.txStateManager.getTx(txId) + raven.captureMessage('Transaction Failed', { + // "extra" key is required by Sentry + extra: txMeta, + }) + }) + // setup state persistence pump( asStream(controller.store), diff --git a/app/scripts/setupRaven.js b/app/scripts/setupRaven.js index 4888c85fe..7beffeff9 100644 --- a/app/scripts/setupRaven.js +++ b/app/scripts/setupRaven.js @@ -21,4 +21,6 @@ function setupRaven(opts) { Raven.config(ravenTarget, { release, }).install() + + return Raven } |