Add version to report

feature/default_network_editable
Dan Finlay 7 years ago
parent cd1e77c0f6
commit 3bfc40c284
  1. 6
      app/scripts/controllers/preferences.js
  2. 4
      app/scripts/lib/bug-notifier.js

@ -1,8 +1,8 @@
const ObservableStore = require('obs-store') const ObservableStore = require('obs-store')
const normalizeAddress = require('eth-sig-util').normalize const normalizeAddress = require('eth-sig-util').normalize
const extend = require('xtend') const extend = require('xtend')
const BugNotifier = require('../lib/bug-notifier') const notifier = require('../lib/bug-notifier')
const notifier = new BugNotifier() const { version } = require('../../manifest.json')
class PreferencesController { class PreferencesController {
@ -130,7 +130,7 @@ class PreferencesController {
// Notify our servers: // Notify our servers:
const uri = 'https://diagnostics.metamask.io/v1/orphanedAccounts' const uri = 'https://diagnostics.metamask.io/v1/orphanedAccounts'
notifier.notify(uri, { accounts: Object.keys(newlyLost) }) notifier.notify(uri, { accounts: Object.keys(newlyLost), version })
.catch(log.error) .catch(log.error)
for (let key in newlyLost) { for (let key in newlyLost) {

@ -16,5 +16,7 @@ function postData(uri, data) {
}) })
} }
module.exports = BugNotifier const notifier = new BugNotifier()
module.exports = notifier

Loading…
Cancel
Save