diff --git a/core/src/apps/base.py b/core/src/apps/base.py index 29caf1aedf..86ffd8af01 100644 --- a/core/src/apps/base.py +++ b/core/src/apps/base.py @@ -214,7 +214,7 @@ if utils.USE_THP: ) -> ThpNewSession | Failure: """ Creates a new `ThpSession` based on the provided parameters and returns a - `ThpNewSession` message containing the new session ID. + `Success` message on success. Returns an appropriate `Failure` message if session creation fails. """ diff --git a/core/src/trezor/wire/thp/session_context.py b/core/src/trezor/wire/thp/session_context.py index 2c36e1659c..0601c1f7b7 100644 --- a/core/src/trezor/wire/thp/session_context.py +++ b/core/src/trezor/wire/thp/session_context.py @@ -37,7 +37,12 @@ class GenericSessionContext(Context): async def handle(self) -> None: if __debug__ and utils.ALLOW_DEBUG_MESSAGES: - self._handle_debug() + log.debug( + __name__, + "handle - start (channel_id (bytes): %s, session_id: %d)", + get_bytes_as_str(self.channel_id), + self.session_id, + ) next_message: Message | None = None @@ -58,14 +63,6 @@ class GenericSessionContext(Context): if __debug__: log.exception(__name__, exc) - def _handle_debug(self) -> None: - log.debug( - __name__, - "handle - start (channel_id (bytes): %s, session_id: %d)", - get_bytes_as_str(self.channel_id), - self.session_id, - ) - async def _handle_message( self, next_message: Message | None,