fix(StatusSeedPhraseInput): ensure `doneInsertingWord` is emitted

When `completeWorldFill()` was called, we relied on it to implicitly
emit `doneInsertingWord()` via the seed phrase input's text change
event.

However, it turns out `doneInsertingWord` is only emitted by the
component when the filtered suggestion list has one item.

In practice this isn't always the case, for example the word "fun"
might be desired, in which case the suggestion list includes "fun"
and "funny".

This introduces some third order effects, such that in Status Desktop
the view doesn't get notified that a word has been inserted, which then
causes it invalidate the mnemonic (or rather, it keeps the confirm
button disabled because it thinks there were less words inserted than
required).

To account for this we always explicitly emit the `doneInsertWord`
signal.
This commit is contained in:
Pascal Precht 2022-05-12 12:35:49 +02:00
parent 457e5fe4af
commit 936955e737
No known key found for this signature in database
GPG Key ID: 3017C135E0731E5A
1 changed files with 1 additions and 1 deletions

View File

@ -212,8 +212,8 @@ Item {
function completeWordFill(seedWord) {
seedWordInput.input.edit.text = seedWord.trim();
// Changing the text of the input triggers the onTextChanged, thus signalling doneInsertingWord if the condition passes
seedWordInput.input.edit.cursorPosition = seedWordInput.text.length;
root.doneInsertingWord(seedWord.trim());
}
clip: true