trezor: support Safe 7#10677
Conversation
Trezor Safe 7 is using Trezor-Host Protocol, for encrypted and authenticated communication: https://docs.trezor.io/trezor-firmware/common/thp/specification.html Since it requires a pairing process before device features are available, an additional `WCTrezorPair` wizard step is introduced, allowing the user to enter 6-digit pairing code (as shown on the device).
| class WCTrezorPair(WalletWizardComponent, Logger): | ||
| def __init__(self, parent, wizard): | ||
| WalletWizardComponent.__init__(self, parent, wizard, title=_('Trezor Pairing')) | ||
| Logger.__init__(self) | ||
| self.plugins = wizard.plugins | ||
| self._busy = True |
There was a problem hiding this comment.
Since it requires a pairing process before device features are available, an additional WCTrezorPair wizard step is introduced
Oh. So it works differently from the previous devices. In that case I would like to ask for 2 or 3 samples we can use for manual testing in the future when refactoring code. Maybe during btcprague? Then shipping could be avoided.
| if self.wizard_data['wallet_exists']: | ||
| next_view = 'trezor_unlock' | ||
| else: | ||
| next_view = ['trezor_not_initialized', 'trezor_start'][client.features.initialized] | ||
|
|
||
| self.wizard_data['_after_pairing'] = next_view |
There was a problem hiding this comment.
don't determine the next view here. Instead, record state (paired, not paired), and determine next view in the plugin's wizard extension declaration.
There was a problem hiding this comment.
Instead, record state (paired, not paired), and determine next view in the plugin's wizard extension declaration.
cff4a65 will keep initialization state in wizard_data['trezor_initialized'] and choose the next view using _after_pairing() callback at TrezorPlugin.
Please let me know if you have meant something else.
Trezor Safe 7 is using Trezor-Host Protocol, for encrypted and authenticated communication.
Since it requires a pairing process before device features are available, an additional
WCTrezorPairwizard step is introduced, allowing the user to enter 6-digit pairing code (as shown on the device).TODOs: