mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
diagnostics - minor fixes
This commit is contained in:
parent
ece5cfc785
commit
36a0574f56
@ -7,7 +7,7 @@ class DiagnosticsReporter {
|
|||||||
|
|
||||||
async reportOrphans(orphans) {
|
async reportOrphans(orphans) {
|
||||||
try {
|
try {
|
||||||
await this.submit({
|
return await this.submit({
|
||||||
accounts: Object.keys(orphans),
|
accounts: Object.keys(orphans),
|
||||||
metadata: {
|
metadata: {
|
||||||
type: 'orphans',
|
type: 'orphans',
|
||||||
@ -28,7 +28,7 @@ class DiagnosticsReporter {
|
|||||||
accounts: await keyring.getAccounts(),
|
accounts: await keyring.getAccounts(),
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
await this.submit({
|
return await this.submit({
|
||||||
accounts: [],
|
accounts: [],
|
||||||
metadata: {
|
metadata: {
|
||||||
type: 'keyrings',
|
type: 'keyrings',
|
||||||
@ -49,7 +49,7 @@ class DiagnosticsReporter {
|
|||||||
return await postData(message)
|
return await postData(message)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('DiagnosticsReporter - "submit" encountered an error:')
|
console.error('DiagnosticsReporter - "submit" encountered an error:')
|
||||||
console.error(err)
|
throw err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,8 +496,8 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
|
|
||||||
// verify keyrings
|
// verify keyrings
|
||||||
const nonSimpleKeyrings = this.keyringController.keyrings.filter(keyring => keyring.type !== 'Simple Key Pair')
|
const nonSimpleKeyrings = this.keyringController.keyrings.filter(keyring => keyring.type !== 'Simple Key Pair')
|
||||||
if (nonSimpleKeyrings.length > 1) {
|
if (nonSimpleKeyrings.length > 1 && this.diagnostics) {
|
||||||
if (this.diagnostics) await this.reportMultipleKeyrings(nonSimpleKeyrings)
|
await this.reportMultipleKeyrings(nonSimpleKeyrings)
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.preferencesController.syncAddresses(accounts)
|
await this.preferencesController.syncAddresses(accounts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user