aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJenny Pollack <jennypollack3@gmail.com>2018-07-19 23:58:59 +0800
committerGitHub <noreply@github.com>2018-07-19 23:58:59 +0800
commitae811628d96f3f678eb592221256b1f5770b7111 (patch)
tree293612472f13bec3bdf41f1227ca6e9b86f9921e /app
parent6d04c80302736133b0e741aa51719d0802cd8a2f (diff)
parent16fc7efef17aa9579f6b7ac8fe33026511301f20 (diff)
downloadtangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar.gz
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar.bz2
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar.lz
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar.xz
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.tar.zst
tangerine-wallet-browser-ae811628d96f3f678eb592221256b1f5770b7111.zip
Merge pull request #4833 from MetaMask/brave-flag-sentry
sentry - add detection for Brave Browser
Diffstat (limited to 'app')
-rw-r--r--app/scripts/background.js4
-rw-r--r--app/scripts/lib/setupRaven.js8
2 files changed, 8 insertions, 4 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 1479d9f72..e07b6b38a 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -44,8 +44,8 @@ const notificationManager = new NotificationManager()
global.METAMASK_NOTIFIER = notificationManager
// setup sentry error reporting
-const release = platform.getVersion()
-const raven = setupRaven({ release })
+const releaseVersion = platform.getVersion()
+const raven = setupRaven({ releaseVersion })
// browser check if it is Edge - https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
// Internet Explorer 6-11
diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js
index 3f69fb3bb..e657e278f 100644
--- a/app/scripts/lib/setupRaven.js
+++ b/app/scripts/lib/setupRaven.js
@@ -8,8 +8,10 @@ module.exports = setupRaven
// Setup raven / sentry remote error reporting
function setupRaven (opts) {
- const { release } = opts
+ const { releaseVersion } = opts
let ravenTarget
+ // detect brave
+ const isBrave = Boolean(window.chrome.ipcRenderer)
if (METAMASK_DEBUG) {
console.log('Setting up Sentry Remote Error Reporting: DEV')
@@ -20,9 +22,11 @@ function setupRaven (opts) {
}
const client = Raven.config(ravenTarget, {
- release,
+ releaseVersion,
transport: function (opts) {
+ opts.data.extra.isBrave = isBrave
const report = opts.data
+
try {
// handle error-like non-error exceptions
rewriteErrorLikeExceptions(report)