aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-06-05 06:03:31 +0800
committerDan Finlay <dan@danfinlay.com>2018-06-05 06:03:31 +0800
commit0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f (patch)
tree73908bc57400a1fd272262cd0d1582d868f5d8c1 /app
parent3bfc40c2848d3e814fca663fa039c261097976c3 (diff)
downloadtangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar.gz
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar.bz2
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar.lz
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar.xz
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.tar.zst
tangerine-wallet-browser-0eacee8e45a3f9c3cbedf99ac79d0c37a8a9f87f.zip
Add first time info to bug report
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/preferences.js5
-rw-r--r--app/scripts/metamask-controller.js1
2 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js
index 39ca16f28..70fbd1224 100644
--- a/app/scripts/controllers/preferences.js
+++ b/app/scripts/controllers/preferences.js
@@ -33,6 +33,8 @@ class PreferencesController {
lostIdentities: {},
}, opts.initState)
+ this.getFirstTimeInfo = opts.getFirstTimeInfo || null
+
this.store = new ObservableStore(initState)
}
// PUBLIC METHODS
@@ -130,7 +132,8 @@ class PreferencesController {
// Notify our servers:
const uri = 'https://diagnostics.metamask.io/v1/orphanedAccounts'
- notifier.notify(uri, { accounts: Object.keys(newlyLost), version })
+ const firstTimeInfo = this.getFirstTimeInfo ? this.getFirstTimeInfo() : {}
+ notifier.notify(uri, { accounts: Object.keys(newlyLost), version, firstTimeInfo })
.catch(log.error)
for (let key in newlyLost) {
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 85c1fe09c..c753fc06f 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -85,6 +85,7 @@ module.exports = class MetamaskController extends EventEmitter {
this.preferencesController = new PreferencesController({
initState: initState.PreferencesController,
initLangCode: opts.initLangCode,
+ getFirstTimeInfo: () => initState.firstTimeInfo,
})
// currency controller