From 59830a032ae76c80b18a19790ea64f2661bae0d6 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Fri, 19 Apr 2024 21:03:45 +0200 Subject: [PATCH] refactor(core): rename context to channel in thp_v1.py --- core/src/trezor/wire/thp_v1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/trezor/wire/thp_v1.py b/core/src/trezor/wire/thp_v1.py index e87159339..be610fb40 100644 --- a/core/src/trezor/wire/thp_v1.py +++ b/core/src/trezor/wire/thp_v1.py @@ -91,12 +91,12 @@ async def _handle_broadcast( if not checksum.is_valid(payload[-4:], header.to_bytes() + payload[:-4]): raise ThpError("Checksum is not valid") - new_context: Channel = Channel.create_new_channel(iface, _BUFFER) - cid = int.from_bytes(new_context.channel_id, "big") - CHANNELS[cid] = new_context + new_channel: Channel = Channel.create_new_channel(iface, _BUFFER) + cid = int.from_bytes(new_channel.channel_id, "big") + CHANNELS[cid] = new_channel response_data = thp_messages.get_channel_allocation_response( - nonce, new_context.channel_id + nonce, new_channel.channel_id ) response_header = InitHeader.get_channel_allocation_response_header( len(response_data) + CHECKSUM_LENGTH,