Fix irresponsive taker invoice when a maker/seller is not active

This commit is contained in:
Reckless_Satoshi 2022-01-30 07:50:22 -08:00
parent 58ecb607c3
commit 13517047e0
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -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: