-
Notifications
You must be signed in to change notification settings - Fork 198
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
Use Optional for passphrase #644
Conversation
We need to distinguish between passphrase not set, and empty passphrase. So use an Optional instead of checking for the empty string.
9ff1c32
to
0c4df0c
Compare
Updated to unify Trezor's enumerate and other commands behavior. Both will require a passphrase to be provided if passphrase protection is on. |
If the passphrase is not provided and passphrase protection is enabled, default to the empty string.
#639 (comment) recommends that we default to the empty string passphrase if no passphrase is provided, so I've updated this to do that. |
Just fyi: Works fine with Specter now. |
@achow101 just checking in, when are you planning a new release with that PR included? The last release was in May, so might perhaps be about time anyway? |
@moneymanolis I plan on making a release at the beginning of the new year. |
Great, thanks! |
Since bitcoin-core#644, not providing a passphrase to a trezor that has passphrases enabled will only result in a warning rather than setting `needs_passphrase_set` to false.
… passphrase changes b8a379c test, trezor: Properly pass empty string passphrase (Andrew Chow) c3f490f test, trezor: Check for warnings rather than needs_passphrase_sent (Andrew Chow) 203c844 trezor: Add missing NoPasswordError import (Andrew Chow) Pull request description: Fixes a couple things were missed following #644 which are causing CI failures in Trezor tests. Top commit has no ACKs. Tree-SHA512: 508c6c9cdbc18833360a146296293500480938723843927e980e124ab24cb17f035418623e7fcb3e1a196e3e6bb7754bdd3bd2903d5d9064918ad875124efd1a
We should be distinguishing from the empty passphrase and no passphrase provided, so instead of defaulting to the empty passphrase, change passphrase (aka password) to an
Optional
. This way, if it is not provided, it isNone
and empty passphrases can be handled correctly.Fixes #639