mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
add documentation
This commit is contained in:
parent
2b86d65d0c
commit
f7d4a1080d
@ -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…
Reference in New Issue
Block a user