add documentation

feature/default_network_editable
Csaba Solya 7 years ago
parent 2b86d65d0c
commit f7d4a1080d
  1. 5
      app/scripts/lib/seed-phrase-verifier.js
  2. 4
      app/scripts/metamask-controller.js

@ -2,6 +2,11 @@ const KeyringController = require('eth-keyring-controller')
const seedPhraseVerifier = {
// Verifies if the seed words can restore the accounts.
//
// The seed words can recreate the primary keyring and the accounts belonging to it.
// The created accounts in the primary keyring are always the same.
// The keyring always creates the accounts in the same sequence.
verifyAccounts (createdAccounts, seedWords) {
return new Promise((resolve, reject) => {

@ -600,6 +600,10 @@ module.exports = class MetamaskController extends EventEmitter {
})
}
// Verifies the current vault's seed words if they can restore the
// accounts belonging to the current vault.
//
// Called when the first account is created and on unlocking the vault.
verifySeedPhrase (cb) {
const primaryKeyring = this.keyringController.getKeyringsByType('HD Key Tree')[0]

Loading…
Cancel
Save