mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
metamask controller - adopt clearSeedWords from keyring controller
This commit is contained in:
parent
2b34cb4564
commit
2f79781ab9
@ -154,17 +154,6 @@ module.exports = class KeyringController extends EventEmitter {
|
|||||||
.then(this.fullUpdate.bind(this))
|
.then(this.fullUpdate.bind(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClearSeedWordCache
|
|
||||||
//
|
|
||||||
// returns Promise( @string currentSelectedAccount )
|
|
||||||
//
|
|
||||||
// Removes the current vault's seed words from the UI's state tree,
|
|
||||||
// ensuring they are only ever available in the background process.
|
|
||||||
clearSeedWordCache () {
|
|
||||||
this.configManager.setSeedWords(null)
|
|
||||||
return Promise.resolve(this.configManager.getSelectedAccount())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set Locked
|
// Set Locked
|
||||||
// returns Promise( @object state )
|
// returns Promise( @object state )
|
||||||
//
|
//
|
||||||
|
@ -146,7 +146,14 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
promiseToCallback(this.keyringController.fullUpdate())(cb)
|
promiseToCallback(this.keyringController.fullUpdate())(cb)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearSeedWordCache: nodeify(keyringController.clearSeedWordCache).bind(keyringController),
|
// ClearSeedWordCache
|
||||||
|
//
|
||||||
|
// Removes the primary account's seed words from the UI's state tree,
|
||||||
|
// ensuring they are only ever available in the background process.
|
||||||
|
clearSeedWordCache: (cb) => {
|
||||||
|
this.configManager.setSeedWords(null)
|
||||||
|
cb(null, this.configManager.getSelectedAccount())
|
||||||
|
},
|
||||||
setLocked: nodeify(keyringController.setLocked).bind(keyringController),
|
setLocked: nodeify(keyringController.setLocked).bind(keyringController),
|
||||||
submitPassword: (password, cb) => {
|
submitPassword: (password, cb) => {
|
||||||
this.migrateOldVaultIfAny(password)
|
this.migrateOldVaultIfAny(password)
|
||||||
@ -321,9 +328,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||||||
setupPublicConfig (outStream) {
|
setupPublicConfig (outStream) {
|
||||||
pipe(
|
pipe(
|
||||||
this.publicConfigStore,
|
this.publicConfigStore,
|
||||||
outStream,
|
outStream
|
||||||
// cleanup on disconnect
|
|
||||||
() => this.publicConfigStore.unpipe(outStream)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user