diff options
author | kumavis <aaron@kumavis.me> | 2018-10-20 14:22:50 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-10-20 14:22:50 +0800 |
commit | e3fda83ab209af7836ba93bfaba215c271d73e8a (patch) | |
tree | 6d6da4ab79a36269d1580e74bea84dfbb0ceb68a /app/scripts/background.js | |
parent | 31175dcb24d836650469775a50289bfc131bcd18 (diff) | |
download | dexon-wallet-e3fda83ab209af7836ba93bfaba215c271d73e8a.tar.gz dexon-wallet-e3fda83ab209af7836ba93bfaba215c271d73e8a.tar.zst dexon-wallet-e3fda83ab209af7836ba93bfaba215c271d73e8a.zip |
sentry - replace raven-js with sentry/browser
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 509a0001..2455608a 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -23,7 +23,7 @@ const createStreamSink = require('./lib/createStreamSink') const NotificationManager = require('./lib/notification-manager.js') const MetamaskController = require('./metamask-controller') const rawFirstTimeState = require('./first-time-state') -const setupRaven = require('./lib/setupRaven') +const setupSentry = require('./lib/setupSentry') const reportFailedTxToSentry = require('./lib/reportFailedTxToSentry') const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics') const EdgeEncryptor = require('./edge-encryptor') @@ -50,7 +50,7 @@ global.METAMASK_NOTIFIER = notificationManager // setup sentry error reporting const release = platform.getVersion() -const raven = setupRaven({ release }) +const sentry = setupSentry({ release }) // 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 @@ -197,14 +197,14 @@ async function loadStateFromPersistence () { // we were able to recover (though it might be old) versionedData = diskStoreState const vaultStructure = getObjStructure(versionedData) - raven.captureMessage('MetaMask - Empty vault found - recovered from diskStore', { + sentry.captureMessage('MetaMask - Empty vault found - recovered from diskStore', { // "extra" key is required by Sentry extra: { vaultStructure }, }) } else { // unable to recover, clear state versionedData = migrator.generateInitialState(firstTimeState) - raven.captureMessage('MetaMask - Empty vault found - unable to recover') + sentry.captureMessage('MetaMask - Empty vault found - unable to recover') } } @@ -212,7 +212,7 @@ async function loadStateFromPersistence () { migrator.on('error', (err) => { // get vault structure without secrets const vaultStructure = getObjStructure(versionedData) - raven.captureException(err, { + sentry.captureException(err, { // "extra" key is required by Sentry extra: { vaultStructure }, }) @@ -279,7 +279,7 @@ function setupController (initState, initLangCode) { if (status !== 'failed') return const txMeta = controller.txController.txStateManager.getTx(txId) try { - reportFailedTxToSentry({ raven, txMeta }) + reportFailedTxToSentry({ sentry, txMeta }) } catch (e) { console.error(e) } |