From 58df712f29d7cc372ad8b9693822828137b92259 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Mon, 15 Apr 2024 11:20:04 +0200 Subject: [PATCH] Fix handling of pairing request --- core/src/apps/thp/pairing.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/apps/thp/pairing.py b/core/src/apps/thp/pairing.py index 0eae6b921..433d2d74e 100644 --- a/core/src/apps/thp/pairing.py +++ b/core/src/apps/thp/pairing.py @@ -39,13 +39,13 @@ async def handle_pairing_request( if _is_method_included(ctx, ThpPairingMethod.PairingMethod_CodeEntry): ctx.channel.set_channel_state(ChannelState.TP2) await context.call(ThpCodeEntryCommitment(), ThpCodeEntryChallenge) - - ctx.channel.set_channel_state(ChannelState.TP3) - await context.call_any( - ThpPairingPreparationsFinished(), - MessageType.ThpQrCodeTag, - MessageType.ThpNfcUnidirectionalTag, - ) + else: + ctx.channel.set_channel_state(ChannelState.TP3) + await context.call_any( + ThpPairingPreparationsFinished(), + MessageType.ThpQrCodeTag, + MessageType.ThpNfcUnidirectionalTag, + ) async def handle_code_entry_challenge(