diff options
keyring-controller - cleanup
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/keyring-controller.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 858ea19ee..5c75ca04a 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -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) |