aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/seed-phrase-verifier.js
diff options
context:
space:
mode:
authorDan Finlay <542863+danfinlay@users.noreply.github.com>2018-04-25 00:51:18 +0800
committerGitHub <noreply@github.com>2018-04-25 00:51:18 +0800
commitac334d7b1a9cd8b6888f5c4f3309740d5df62474 (patch)
tree7498f29e899821d879b3f68a42b8995f42f80321 /app/scripts/lib/seed-phrase-verifier.js
parent66ae4a948abbebdb513f9bd60d47fda36095e8df (diff)
parent0fbd389a509a2447d833192bbe854c586890d512 (diff)
downloadtangerine-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.js18
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) => {