Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 803322e

Browse files
committed
refactor: clean up SMP code
1 parent 3bc0399 commit 803322e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

logic/smp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,20 +529,20 @@ def smp_data_handler(user_data, user_data_lock, user_data_copied, ui_queue, mess
529529
smp_failure(user_data, user_data_lock, contact_id, ui_queue)
530530

531531
elif smp_step == 3:
532-
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]): # or (user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["smp_step"] != 1):
532+
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]):
533533
logger.error("Contact (%s) is not pending verification, yet they sent us a SMP request. Ignoring it.", contact_id)
534534
return
535535

536536
smp_step_3(user_data, user_data_lock, contact_id, message, ui_queue)
537537
elif smp_step == 4:
538-
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]): # or (user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["smp_step"] != 2):
538+
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]):
539539
logger.error("Contact (%s) is not pending verification, yet they sent us a SMP request. Ignoring it.", contact_id)
540540
return
541541

542542
smp_step_4_request_answer(user_data, user_data_lock, contact_id, message, ui_queue)
543543

544544
elif smp_step == 5:
545-
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]): # or (user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["smp_step"] != 3):
545+
if (not user_data_copied["contacts"][contact_id]["lt_sign_key_smp"]["pending_verification"]):
546546
logger.error("Contact (%s) is not pending verification, yet they sent us a SMP request. Ignoring it.", contact_id)
547547
return
548548

0 commit comments

Comments
 (0)