Skip to content

Commit 8bde9b7

Browse files
committed
fixup! WIP: switch THP to rust/trezor-thp
1 parent 44bdc61 commit 8bde9b7

7 files changed

Lines changed: 408 additions & 165 deletions

File tree

core/embed/rust/src/thp/micropython.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,10 @@ impl TryFrom<TrezorInResult> for Obj {
366366
val.try_into()?
367367
}
368368
TrezorInResult::Failed => FAILED_OBJ.as_obj(),
369-
TrezorInResult::KeyRequired(true) => KEY_REQUIRED_UNLOCK_OBJ.as_obj(),
370-
TrezorInResult::KeyRequired(_) => KEY_REQUIRED_OBJ.as_obj(),
369+
TrezorInResult::KeyRequired {
370+
try_to_unlock: true,
371+
} => KEY_REQUIRED_UNLOCK_OBJ.as_obj(),
372+
TrezorInResult::KeyRequired { .. } => KEY_REQUIRED_OBJ.as_obj(),
371373
TrezorInResult::MessageReady => MESSAGE_READY_OBJ.as_obj(),
372374
TrezorInResult::MessageReadyAck => MESSAGE_READY_ACK_OBJ.as_obj(),
373375
TrezorInResult::Ack => ACK_OBJ.as_obj(),
@@ -521,7 +523,7 @@ pub static mp_module_trezorthp: Module = obj_module! {
521523

522524
/// def channel_close_all(exclude_channel_id: int | None) -> None:
523525
/// """
524-
/// Closes all channel on all interfaces. If `exclude_channel_id` is not None, it
526+
/// Closes all channels on all interfaces. If `exclude_channel_id` is not None, it
525527
/// will be left as the only channel.
526528
/// Please note the closed channels are not returned by `channel_get_closed()`.
527529
/// Caller is responsible for deleting all relevant sessions manually.

0 commit comments

Comments
 (0)