diff options
author | kumavis <aaron@kumavis.me> | 2018-06-06 03:20:24 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-06-06 03:20:24 +0800 |
commit | 36a0574f566ba2b9aac53396721c0075dd1107e5 (patch) | |
tree | cef83cc2bab74baee0c086af31eb086f5e464c62 | |
parent | ece5cfc7858cb3e8077fad2c11f165a437e60413 (diff) | |
download | dexon-wallet-36a0574f566ba2b9aac53396721c0075dd1107e5.tar.gz dexon-wallet-36a0574f566ba2b9aac53396721c0075dd1107e5.tar.zst dexon-wallet-36a0574f566ba2b9aac53396721c0075dd1107e5.zip |
diagnostics - minor fixes
-rw-r--r-- | app/scripts/lib/diagnostics-reporter.js | 6 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/lib/diagnostics-reporter.js b/app/scripts/lib/diagnostics-reporter.js index 534a0fa8..aa4ca6e2 100644 --- a/app/scripts/lib/diagnostics-reporter.js +++ b/app/scripts/lib/diagnostics-reporter.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 } } diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 4b0b0030..18a2e7c4 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -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) |