From 13517047e0bac9a889207c6abdbbddeb285e274a Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Sun, 30 Jan 2022 07:50:22 -0800 Subject: [PATCH] Fix irresponsive taker invoice when a maker/seller is not active --- api/logics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/logics.py b/api/logics.py index 85f5acda..459f52f1 100644 --- a/api/logics.py +++ b/api/logics.py @@ -317,8 +317,11 @@ class Logics(): # If the order status is 'Waiting for both'. Move forward to 'waiting for escrow' if order.status == Order.Status.WF2: - # If the escrow is lock move to Chat. - if order.trade_escrow.status == LNPayment.Status.LOCKED: + # If the escrow does not exist, or is not locked move to WFE. + if order.trade_escrow == None: + order.status = Order.Status.WFE + # If the escrow is locked move to Chat. + elif order.trade_escrow.status == LNPayment.Status.LOCKED: order.status = Order.Status.CHA order.expires_at = timezone.now() + timedelta(seconds=Order.t_to_expire[Order.Status.CHA]) else: