Refactor message handling logic to simplify condition checks for anchor validity

This commit is contained in:
Nawaz Haider
2026-01-02 15:55:29 +06:00
parent 00ec9a3585
commit 99e843aeb1
+1 -6
View File
@@ -120,12 +120,7 @@ async def handle_message(message):
outcome = data.get("outcome")
status = data.get("status")
if (
not anchor_id
or side != "BUY"
or not outcome
or (status not in ["MATCHED", "MINED", "CONFIRMED"])
):
if not anchor_id or side != "BUY" or not outcome or (status != "MATCHED"):
return
async with state.lock: