aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-06-05 05:59:46 +0800
committerDan Finlay <dan@danfinlay.com>2018-06-05 05:59:46 +0800
commit3bfc40c2848d3e814fca663fa039c261097976c3 (patch)
treeaca64f001958ddff6bf32f4e39e62e5f4a51f0a1
parentcd1e77c0f60cbc4832ff8adf184564fee4fb991b (diff)
downloadtangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar.gz
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar.bz2
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar.lz
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar.xz
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.tar.zst
tangerine-wallet-browser-3bfc40c2848d3e814fca663fa039c261097976c3.zip
Add version to report
-rw-r--r--app/scripts/controllers/preferences.js6
-rw-r--r--app/scripts/lib/bug-notifier.js4
2 files changed, 6 insertions, 4 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js
index 18254af4b..39ca16f28 100644
--- a/app/scripts/controllers/preferences.js
+++ b/app/scripts/controllers/preferences.js
@@ -1,8 +1,8 @@
const ObservableStore = require('obs-store')
const normalizeAddress = require('eth-sig-util').normalize
const extend = require('xtend')
-const BugNotifier = require('../lib/bug-notifier')
-const notifier = new BugNotifier()
+const notifier = require('../lib/bug-notifier')
+const { version } = require('../../manifest.json')
class PreferencesController {
@@ -130,7 +130,7 @@ class PreferencesController {
// Notify our servers:
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)
for (let key in newlyLost) {
diff --git a/app/scripts/lib/bug-notifier.js b/app/scripts/lib/bug-notifier.js
index 42f943485..bfb3e9770 100644
--- a/app/scripts/lib/bug-notifier.js
+++ b/app/scripts/lib/bug-notifier.js
@@ -16,5 +16,7 @@ function postData(uri, data) {
})
}
-module.exports = BugNotifier
+const notifier = new BugNotifier()
+
+module.exports = notifier