diff options
author | Dan <danjm.com@gmail.com> | 2018-04-19 23:38:56 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-04-19 23:38:56 +0800 |
commit | 9f12c26d44a0d78f28af25056857b993f80bbd95 (patch) | |
tree | a8a9c102eed9d0c972be80142a2087917b16c511 /app/scripts/lib/seed-phrase-verifier.js | |
parent | 6da00c4061b4af1bb282c9ad68eaa2deef84093b (diff) | |
download | tangerine-wallet-browser-9f12c26d44a0d78f28af25056857b993f80bbd95.tar.gz tangerine-wallet-browser-9f12c26d44a0d78f28af25056857b993f80bbd95.tar.zst tangerine-wallet-browser-9f12c26d44a0d78f28af25056857b993f80bbd95.zip |
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 9cea22029..826e73306 100644 --- a/app/scripts/lib/seed-phrase-verifier.js +++ b/app/scripts/lib/seed-phrase-verifier.js @@ -2,11 +2,19 @@ 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. + /** + * 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) => { |