aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/preferences.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-06-06 04:35:25 +0800
committerGitHub <noreply@github.com>2018-06-06 04:35:25 +0800
commit39a7702c8f0aa2c2e7fdf2bcf913e76bb8b827f4 (patch)
tree3debb11f863bd2d400bebeebc0ed8b0e862ba19a /app/scripts/controllers/preferences.js
parente1cd3562cef92a78945056dc557d4228a72b119c (diff)
parentf73feccf5af76312f9b0a65c42b2bd0877dfba7d (diff)
downloadtangerine-wallet-browser-39a7702c8f0aa2c2e7fdf2bcf913e76bb8b827f4.tar.gz
tangerine-wallet-browser-39a7702c8f0aa2c2e7fdf2bcf913e76bb8b827f4.tar.zst
tangerine-wallet-browser-39a7702c8f0aa2c2e7fdf2bcf913e76bb8b827f4.zip
Merge pull request #4511 from MetaMask/v4.7.4
Version 4.7.4
Diffstat (limited to 'app/scripts/controllers/preferences.js')
-rw-r--r--app/scripts/controllers/preferences.js19
1 files changed, 4 insertions, 15 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js
index 2fe009f9a..a5d8cc27b 100644
--- a/app/scripts/controllers/preferences.js
+++ b/app/scripts/controllers/preferences.js
@@ -1,9 +1,7 @@
const ObservableStore = require('obs-store')
const normalizeAddress = require('eth-sig-util').normalize
const extend = require('xtend')
-const notifier = require('../lib/bug-notifier')
-const log = require('loglevel')
-const { version } = require('../../manifest.json')
+
class PreferencesController {
@@ -34,8 +32,7 @@ class PreferencesController {
lostIdentities: {},
}, opts.initState)
- this.getFirstTimeInfo = opts.getFirstTimeInfo || null
- this.notifier = opts.notifier || notifier
+ this.diagnostics = opts.diagnostics
this.store = new ObservableStore(initState)
}
@@ -128,17 +125,9 @@ class PreferencesController {
if (Object.keys(newlyLost).length > 0) {
// Notify our servers:
- const uri = 'https://diagnostics.metamask.io/v1/orphanedAccounts'
- const firstTimeInfo = this.getFirstTimeInfo ? this.getFirstTimeInfo() : {}
- this.notifier.notify(uri, {
- accounts: Object.keys(newlyLost),
- metadata: {
- version,
- firstTimeInfo,
- },
- })
- .catch(log.error)
+ if (this.diagnostics) this.diagnostics.reportOrphans(newlyLost)
+ // store lost accounts
for (let key in newlyLost) {
lostIdentities[key] = newlyLost[key]
}