From d12bf422f36806478e0672a5398379f51b44d6ec Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 20 Mar 2025 14:12:16 +0200 Subject: [PATCH] fixup! chore(core): adapt trezorlib transports to session based [no changelog] --- python/src/trezorlib/transport/thp/protocol_v1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/trezorlib/transport/thp/protocol_v1.py b/python/src/trezorlib/transport/thp/protocol_v1.py index 675faadf23..9dfb4cb281 100644 --- a/python/src/trezorlib/transport/thp/protocol_v1.py +++ b/python/src/trezorlib/transport/thp/protocol_v1.py @@ -84,11 +84,11 @@ class ProtocolV1Channel(Channel): buffer = bytearray(b"##" + header + message_data) while buffer: - # Report ID, data padded to 63 bytes + # Report ID, data padded to (chunk_size - 1) bytes chunk = b"?" + buffer[: chunk_size - 1] chunk = chunk.ljust(chunk_size, b"\x00") self.transport.write_chunk(chunk) - buffer = buffer[63:] + buffer = buffer[chunk_size - 1:] def _read(self, timeout: float | None = None) -> t.Tuple[int, bytes]: if timeout is None: