diagnostics - minor fixes

feature/default_network_editable
kumavis 7 years ago
parent ece5cfc785
commit 36a0574f56
  1. 6
      app/scripts/lib/diagnostics-reporter.js
  2. 4
      app/scripts/metamask-controller.js

@ -7,7 +7,7 @@ class DiagnosticsReporter {
async reportOrphans(orphans) {
try {
await this.submit({
return await this.submit({
accounts: Object.keys(orphans),
metadata: {
type: 'orphans',
@ -28,7 +28,7 @@ class DiagnosticsReporter {
accounts: await keyring.getAccounts(),
}
}))
await this.submit({
return await this.submit({
accounts: [],
metadata: {
type: 'keyrings',
@ -49,7 +49,7 @@ class DiagnosticsReporter {
return await postData(message)
} catch (err) {
console.error('DiagnosticsReporter - "submit" encountered an error:')
console.error(err)
throw err
}
}

@ -496,8 +496,8 @@ module.exports = class MetamaskController extends EventEmitter {
// verify keyrings
const nonSimpleKeyrings = this.keyringController.keyrings.filter(keyring => keyring.type !== 'Simple Key Pair')
if (nonSimpleKeyrings.length > 1) {
if (this.diagnostics) await this.reportMultipleKeyrings(nonSimpleKeyrings)
if (nonSimpleKeyrings.length > 1 && this.diagnostics) {
await this.reportMultipleKeyrings(nonSimpleKeyrings)
}
await this.preferencesController.syncAddresses(accounts)

Loading…
Cancel
Save