diff --git a/core/src/trezor/wire/message_handler.py b/core/src/trezor/wire/message_handler.py index 694dc9d3a4..c58cd8815b 100644 --- a/core/src/trezor/wire/message_handler.py +++ b/core/src/trezor/wire/message_handler.py @@ -37,7 +37,7 @@ def wrap_protobuf_load( utils.get_bytes_as_str(buffer), ) msg = protobuf.decode(buffer, expected_type, EXPERIMENTAL_ENABLED) - if __debug__ and utils.EMULATOR: + if __debug__ and utils.EMULATOR and utils.ALLOW_DEBUG_MESSAGES: log.debug( __name__, "received message contents:\n%s", utils.dump_protobuf(msg) ) diff --git a/core/src/trezor/wire/thp/channel.py b/core/src/trezor/wire/thp/channel.py index ef983bb2ae..4c35682390 100644 --- a/core/src/trezor/wire/thp/channel.py +++ b/core/src/trezor/wire/thp/channel.py @@ -308,7 +308,7 @@ class Channel: session_id: int = 0, force: bool = False, ) -> None: - if __debug__ and utils.EMULATOR: + if __debug__ and utils.EMULATOR and utils.ALLOW_DEBUG_MESSAGES: log.debug( __name__, "(cid: %s) write message: %s\n%s",