diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-04-25 00:51:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 00:51:18 +0800 |
commit | ac334d7b1a9cd8b6888f5c4f3309740d5df62474 (patch) | |
tree | 7498f29e899821d879b3f68a42b8995f42f80321 /app/scripts/lib/seed-phrase-verifier.js | |
parent | 66ae4a948abbebdb513f9bd60d47fda36095e8df (diff) | |
parent | 0fbd389a509a2447d833192bbe854c586890d512 (diff) | |
download | tangerine-wallet-browser-ac334d7b1a9cd8b6888f5c4f3309740d5df62474.tar.gz tangerine-wallet-browser-ac334d7b1a9cd8b6888f5c4f3309740d5df62474.tar.zst tangerine-wallet-browser-ac334d7b1a9cd8b6888f5c4f3309740d5df62474.zip |
Merge pull request #4040 from MetaMask/dm-docs-2
Even more documentation for various controllers and libs.
Diffstat (limited to 'app/scripts/lib/seed-phrase-verifier.js')
-rw-r--r-- | app/scripts/lib/seed-phrase-verifier.js | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/app/scripts/lib/seed-phrase-verifier.js b/app/scripts/lib/seed-phrase-verifier.js index 7ba712c0d..3b5afb800 100644 --- a/app/scripts/lib/seed-phrase-verifier.js +++ b/app/scripts/lib/seed-phrase-verifier.js @@ -3,11 +3,19 @@ const log = require('loglevel') 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. + /** + * Verifies if the seed words can restore the accounts. + * + * Key notes: + * - 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. + * + * @param {array} createdAccounts The accounts to restore + * @param {string} seedWords The seed words to verify + * @returns {Promise<void>} Promises undefined + * + */ verifyAccounts (createdAccounts, seedWords) { return new Promise((resolve, reject) => { |