trezor / python-trezor

:snake: Don't use this repo, use the new monorepo instead:
https://github.com/trezor/trezor-firmware
GNU Lesser General Public License v3.0
201 stars 194 forks source link

Use ChoiceType for set_passphrase_source #355

Closed prusnak closed 5 years ago

prusnak commented 5 years ago

Currently we use int as argument to set_passphrase_source, see:

https://github.com/trezor/python-trezor/blob/master/trezorctl#L256-L260

This is not nice. Let's use ChoiceType instead. Example:

https://github.com/trezor/python-trezor/blob/3390422ce35d19957e41ee616de321b37f67e21a/trezorctl#L69-L74

Possible values are listed here:

https://github.com/trezor/trezor-common/blob/41e4a84b5b01d03e980f84fab29c8f0b0ec948f5/protob/messages-management.proto#L86-L91

prusnak commented 5 years ago

@matejcik maybe a task for @strmci?