-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: seed word parsing #3607
fix: seed word parsing #3607
Conversation
base_layer/wallet_ffi/src/lib.rs
Outdated
} else { | ||
log::error!( | ||
target: LOG_TARGET, | ||
"Word in seed phrase is inconsistent: {:?}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that there is no language matching the words so far? If so I think this error is not very clear. If you saw it in the logs in isolation would you be able to determine what the problem is? Maybe something like "Current words in seed phrase do not match a supported language"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is meant here is that by adding the word, the language cannot be determined anymore since there are no words that are either in one language or words common to at least one of them. The error will be UnknownLanguage.
Perhaps a pre-detection of the language prior to this and adding "...previously words were detected to be in language
" will help?
f4417e6
to
0e80f16
Compare
Moved detect_language into MnemonicLanguage and made it public. Prevented a TariSeedWords object from becoming invalid in the event an invalid or inconsistent word was attempted to be pushed to it in wallet_ffi. Differentiated between an invalid word and an inconsistent word. Added word to string of WordNotFound error. Review comments
0e80f16
to
1629a6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
* development: fix: seed word parsing (tari-project#3607) feat: add ban peers metric (tari-project#3605) feat!: expose reason for transaction cancellation for callback in wallet_ffi (tari-project#3601) test: improve cucumber scenario robustness (tari-project#3599) feat: use CipherSeed wallet birthday for recovery start point (tari-project#3602) docs: ignore RFC code blocks (tari-project#3603)
Description
Moved
detect_language
intoMnemonicLanguage
and made it public.Prevented a
TariSeedWords
object from becoming invalid in the event an invalid or inconsistent word was attempted to be pushed to it in wallet_ffi.Differentiated between an invalid word and an inconsistent word.
Added word to the string of WordNotFound error.
Motivation and Context
General fixes
How Has This Been Tested?
cargo test --all