Refactor message handling logic to simplify condition checks for anchor validity
This commit is contained in:
+1
-6
@@ -120,12 +120,7 @@ async def handle_message(message):
|
|||||||
outcome = data.get("outcome")
|
outcome = data.get("outcome")
|
||||||
status = data.get("status")
|
status = data.get("status")
|
||||||
|
|
||||||
if (
|
if not anchor_id or side != "BUY" or not outcome or (status != "MATCHED"):
|
||||||
not anchor_id
|
|
||||||
or side != "BUY"
|
|
||||||
or not outcome
|
|
||||||
or (status not in ["MATCHED", "MINED", "CONFIRMED"])
|
|
||||||
):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
async with state.lock:
|
async with state.lock:
|
||||||
|
|||||||
Reference in New Issue
Block a user