Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ class KeyringController extends EventEmitter {
* @returns {Promise<Object>} A Promise that resolves to the state.
*/
createNewVaultAndKeychain(password) {
return this.persistAllKeyrings(password)
.then(this.createFirstKeyTree.bind(this))
return this.createFirstKeyTree(password)
.then(this.persistAllKeyrings.bind(this, password))
.then(this.setUnlocked.bind(this))
.then(this.fullUpdate.bind(this));
Expand Down Expand Up @@ -498,9 +497,11 @@ class KeyringController extends EventEmitter {
* - Faucets that account on testnet
* - Puts the current seed words into the state tree
*
* @param {string} password - The keyring controller password.
* @returns {Promise<void>} - A promise that resolves if the operation was successful.
*/
createFirstKeyTree() {
createFirstKeyTree(password) {
this.password = password;
this.clearKeyrings();
return this.addNewKeyring('HD Key Tree', { numberOfAccounts: 1 })
.then((keyring) => {
Expand Down