1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove unused diagnostics property (#9296)

* Remove unused diagnostics property
This commit is contained in:
Erik Marks 2020-08-25 13:54:15 -07:00 committed by GitHub
parent 3aaa41ef44
commit 81a1d0a23d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 14 deletions

View File

@ -64,7 +64,6 @@ export default class PreferencesController {
ipfsGateway: 'dweb.link', ...opts.initState,
}
this.diagnostics = opts.diagnostics
this.network = opts.network
this.store = new ObservableStore(initState)
this.store.setMaxListeners(12)
@ -328,11 +327,6 @@ export default class PreferencesController {
// Identities are no longer present.
if (Object.keys(newlyLost).length > 0) {
// Notify our servers:
if (this.diagnostics) {
this.diagnostics.reportOrphans(newlyLost)
}
// store lost accounts
Object.keys(newlyLost).forEach((key) => {
lostIdentities[key] = newlyLost[key]

View File

@ -766,12 +766,6 @@ export default class MetamaskController extends EventEmitter {
async submitPassword (password) {
await this.keyringController.submitPassword(password)
// verify keyrings
const nonSimpleKeyrings = this.keyringController.keyrings.filter((keyring) => keyring.type !== 'Simple Key Pair')
if (nonSimpleKeyrings.length > 1 && this.diagnostics) {
await this.diagnostics.reportMultipleKeyrings(nonSimpleKeyrings)
}
await this.blockTracker.checkForLatestBlock()
try {

View File

@ -115,8 +115,7 @@ describe('MetaMaskController', function () {
initState: cloneDeep(firstTimeState),
platform: { showTransactionNotification: () => undefined, getVersion: () => 'foo' },
})
// disable diagnostics
metamaskController.diagnostics = null
// add sinon method spies
sandbox.spy(metamaskController.keyringController, 'createNewVaultAndKeychain')
sandbox.spy(metamaskController.keyringController, 'createNewVaultAndRestore')