Add first time info to bug report

feature/default_network_editable
Dan Finlay 7 years ago
parent 3bfc40c284
commit 0eacee8e45
  1. 5
      app/scripts/controllers/preferences.js
  2. 1
      app/scripts/metamask-controller.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) {

@ -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

Loading…
Cancel
Save