aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
authorThomas <tmashuang@gmail.com>2018-01-23 17:12:50 +0800
committerThomas <tmashuang@gmail.com>2018-01-23 17:12:50 +0800
commit97ca86733cb49750a9909b57ac1f31bc0f49abc5 (patch)
tree9869d35d41b5b1e9e33fa9ff968afb9d1fa1f0ff /app/scripts/background.js
parentb62ec394f55b7bf3209cf5e1dc4721648dfc15dc (diff)
downloadtangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar.gz
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar.bz2
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar.lz
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar.xz
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.tar.zst
tangerine-wallet-browser-97ca86733cb49750a9909b57ac1f31bc0f49abc5.zip
Merge branch 'master' into uat
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js12
1 files changed, 11 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),