trezor: support Safe 7#10677
Conversation
| 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.
|
@SomberNight would it be OK to allow cancellation only for non-THP devices (to avoid bumping Asking since the user can cancel the current flow also from the device itself. |
| def button_request(self, br): | ||
| message = self.msg or MESSAGES.get(br.code) or MESSAGES['default'] | ||
| self.handler.show_message(message.format(self.device), self.client.cancel) | ||
| on_cancel = self.transport.interrupt and self.transport.interrupt.request | ||
| self.handler.show_message(msg=message.format(self.device), on_cancel=on_cancel) |
There was a problem hiding this comment.
would it be OK to allow cancellation only for non-THP devices (to avoid bumping trezorlib due to trezor/trezor-firmware#7112)?
You can disable/hide the cancel functionality if you think that's the most practical approach.
I guess that's better than not having support for a device at all because of something like this :P
Just add a code comment to document the reasoning.
Asking since the user can cancel the current flow also from the device itself.
Was there no way to cancel on-device for the older devices?
There was a problem hiding this comment.
Was there no way to cancel on-device for the older devices?
Yes - older devices also allow the flows to be cancelled via button click / screen touch.
In the worst case, it is also possible to disconnect the device from the host - cancelling the flow by shutting down the device :)
There was a problem hiding this comment.
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).
|
Squashed fixups into a single commit. |
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: