Fix bad reply after submitting invoice

This commit is contained in:
Reckless_Satoshi 2022-06-18 23:09:21 -07:00
parent d0b6241d13
commit f1c4754868
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 6 additions and 6 deletions

View File

@ -95,7 +95,7 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
"order_made_link",
"order_taken_link",
"order_escrow_link",
"order_paid_link",
"order_paid_LN_link",
)
list_display_links = ("hash", "concept")
change_links = (
@ -104,7 +104,7 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin):
"order_made",
"order_taken",
"order_escrow",
"order_paid",
"order_paid_LN",
)
list_filter = ("type", "concept", "status")
ordering = ("-expires_at", )

View File

@ -766,7 +766,7 @@ class Logics:
send_message.delay(order.id,'fiat_exchange_starts')
# If the order status is 'Waiting for both'. Move forward to 'waiting for escrow'
if order.status == Order.Status.WF2:
elif order.status == Order.Status.WF2:
# If the escrow does not exist, or is not locked move to WFE.
if order.trade_escrow == None:
order.status = Order.Status.WFE
@ -780,7 +780,7 @@ class Logics:
order.status = Order.Status.WFE
# If the order status is 'Failed Routing'. Retry payment.
if order.status == Order.Status.FAI:
elif order.status == Order.Status.FAI:
if LNNode.double_check_htlc_is_settled(
order.trade_escrow.payment_hash):
order.status = Order.Status.PAY

View File

@ -475,14 +475,14 @@ class OrderView(viewsets.ViewSet):
)
# 2) If action is 'update invoice'
if action == "update_invoice":
elif action == "update_invoice":
valid, context = Logics.update_invoice(order, request.user,
invoice)
if not valid:
return Response(context, status.HTTP_400_BAD_REQUEST)
# 2.b) If action is 'update address'
if action == "update_address":
elif action == "update_address":
valid, context = Logics.update_address(order, request.user,
address, mining_fee_rate)
if not valid: