mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
keyring-controller - cleanup
This commit is contained in:
parent
8049c1fc07
commit
01c88bb0bd
@ -422,9 +422,10 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
// puts the current seed words into the state tree.
|
||||
createFirstKeyTree () {
|
||||
this.clearKeyrings()
|
||||
return this.addNewKeyring('HD Key Tree', {numberOfAccounts: 1})
|
||||
return this.addNewKeyring('HD Key Tree', { numberOfAccounts: 1 })
|
||||
.then((keyring) => {
|
||||
const firstAccount = keyring.getAccounts()[0]
|
||||
const accounts = keyring.getAccounts()
|
||||
const firstAccount = accounts[0]
|
||||
if (!firstAccount) throw new Error('KeyringController - No account found on keychain.')
|
||||
const hexAccount = normalize(firstAccount)
|
||||
this.configManager.setSelectedAccount(hexAccount)
|
||||
|
Loading…
Reference in New Issue
Block a user