mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Fix bad reply after submitting invoice
This commit is contained in:
parent
d0b6241d13
commit
f1c4754868
@ -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", )
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user