diff options
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/background.js | 4 | ||||
-rw-r--r-- | app/scripts/lib/ipfsContent.js | 6 | ||||
-rw-r--r-- | app/scripts/lib/setupRaven.js | 4 | ||||
-rw-r--r-- | app/scripts/migrations/028.js | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 7eb7b1255..3d3afdd4e 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 releaseVersion = platform.getVersion() -const raven = setupRaven({ releaseVersion }) +const release = platform.getVersion() +const raven = setupRaven({ 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 diff --git a/app/scripts/lib/ipfsContent.js b/app/scripts/lib/ipfsContent.js index 5222151ea..5db63f47d 100644 --- a/app/scripts/lib/ipfsContent.js +++ b/app/scripts/lib/ipfsContent.js @@ -5,7 +5,7 @@ module.exports = function (provider) { function ipfsContent (details) { const name = details.url.substring(7, details.url.length - 1) let clearTime = null - extension.tabs.getSelected(null, tab => { + extension.tabs.query({active: true}, tab => { extension.tabs.update(tab.id, { url: 'loading.html' }) clearTime = setTimeout(() => { @@ -34,11 +34,11 @@ module.exports = function (provider) { return { cancel: true } } - extension.webRequest.onBeforeRequest.addListener(ipfsContent, {urls: ['*://*.eth/', '*://*.test/']}) + extension.webRequest.onErrorOccurred.addListener(ipfsContent, {urls: ['*://*.eth/', '*://*.test/']}) return { remove () { - extension.webRequest.onBeforeRequest.removeListener(ipfsContent) + extension.webRequest.onErrorOccurred.removeListener(ipfsContent) }, } } diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js index e657e278f..3651524f1 100644 --- a/app/scripts/lib/setupRaven.js +++ b/app/scripts/lib/setupRaven.js @@ -8,7 +8,7 @@ module.exports = setupRaven // Setup raven / sentry remote error reporting function setupRaven (opts) { - const { releaseVersion } = opts + const { release } = opts let ravenTarget // detect brave const isBrave = Boolean(window.chrome.ipcRenderer) @@ -22,7 +22,7 @@ function setupRaven (opts) { } const client = Raven.config(ravenTarget, { - releaseVersion, + release, transport: function (opts) { opts.data.extra.isBrave = isBrave const report = opts.data diff --git a/app/scripts/migrations/028.js b/app/scripts/migrations/028.js index 6553a1052..9e995ee1a 100644 --- a/app/scripts/migrations/028.js +++ b/app/scripts/migrations/028.js @@ -25,8 +25,8 @@ function transformState (state) { const newState = state if (newState.PreferencesController) { - if (newState.PreferencesController.tokens) { - const identities = newState.TransactionController.identities + if (newState.PreferencesController.tokens && newState.PreferencesController.identities) { + const identities = newState.PreferencesController.identities const tokens = newState.PreferencesController.tokens newState.PreferencesController.accountTokens = {} for (const identity in identities) { |