Fix handling of pairing request

M1nd3r/thp2
M1nd3r 2 months ago
parent 870f1a3b98
commit 58df712f29

@ -39,13 +39,13 @@ async def handle_pairing_request(
if _is_method_included(ctx, ThpPairingMethod.PairingMethod_CodeEntry): if _is_method_included(ctx, ThpPairingMethod.PairingMethod_CodeEntry):
ctx.channel.set_channel_state(ChannelState.TP2) ctx.channel.set_channel_state(ChannelState.TP2)
await context.call(ThpCodeEntryCommitment(), ThpCodeEntryChallenge) await context.call(ThpCodeEntryCommitment(), ThpCodeEntryChallenge)
else:
ctx.channel.set_channel_state(ChannelState.TP3) ctx.channel.set_channel_state(ChannelState.TP3)
await context.call_any( await context.call_any(
ThpPairingPreparationsFinished(), ThpPairingPreparationsFinished(),
MessageType.ThpQrCodeTag, MessageType.ThpQrCodeTag,
MessageType.ThpNfcUnidirectionalTag, MessageType.ThpNfcUnidirectionalTag,
) )
async def handle_code_entry_challenge( async def handle_code_entry_challenge(

Loading…
Cancel
Save