Commit ad2c2b98 authored by fro's avatar fro
Browse files

fix suggestions

parent 42c286b2
......@@ -127,8 +127,12 @@ export default class AccountSeed extends Component {
const SUGGESTIONS_COUNT = 5;
const result = [];
let yielded = 0;
result.push(WORDS[fromIndex]);
while (yielded < SUGGESTIONS_COUNT && WORDS[fromIndex] !== undefined) {
++fromIndex;
if (!WORDS[fromIndex].startsWith(input)) {
return result;
}
if (words.indexOf(WORDS[fromIndex]) !== -1) {
continue;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment