aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/controllers/preferences.js2
-rw-r--r--app/scripts/lib/bug-notifier.js6
2 files changed, 2 insertions, 6 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js
index 038bab37b..18254af4b 100644
--- a/app/scripts/controllers/preferences.js
+++ b/app/scripts/controllers/preferences.js
@@ -130,7 +130,7 @@ class PreferencesController {
// Notify our servers:
const uri = 'https://diagnostics.metamask.io/v1/orphanedAccounts'
- notifier.notify(uri, { accounts: Object.keys(lostIdentities) })
+ notifier.notify(uri, { accounts: Object.keys(newlyLost) })
.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 d6a2ed2c9..42f943485 100644
--- a/app/scripts/lib/bug-notifier.js
+++ b/app/scripts/lib/bug-notifier.js
@@ -1,14 +1,11 @@
class BugNotifier {
notify (uri, message) {
return postData(uri, message)
- .then(data => console.log(data)) // JSON from `response.json()` call
- .catch(error => console.error(error))
}
}
function postData(uri, data) {
-
- return fetch(url, {
+ return fetch(uri, {
body: JSON.stringify(data), // must match 'Content-Type' header
credentials: 'same-origin', // include, same-origin, *omit
headers: {
@@ -17,7 +14,6 @@ function postData(uri, data) {
method: 'POST', // *GET, POST, PUT, DELETE, etc.
mode: 'cors', // no-cors, cors, *same-origin
})
- .then(response => response.json()) // parses response to JSON
}
module.exports = BugNotifier