fix undeclared ok error.
This commit is contained in:
@@ -107,9 +107,8 @@ def pay_invoice(
|
|||||||
if ok:
|
if ok:
|
||||||
create_payment(checking_id=checking_id, fee=fee_msat, **payment_kwargs)
|
create_payment(checking_id=checking_id, fee=fee_msat, **payment_kwargs)
|
||||||
delete_payment(temp_id)
|
delete_payment(temp_id)
|
||||||
|
else:
|
||||||
if not ok:
|
raise Exception(error_message or "Unexpected backend error.")
|
||||||
raise Exception(error_message or "Unexpected backend error.")
|
|
||||||
|
|
||||||
return invoice.payment_hash
|
return invoice.payment_hash
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ def api_payments_pay_invoice():
|
|||||||
except PermissionError as e:
|
except PermissionError as e:
|
||||||
return jsonify({"message": str(e)}), HTTPStatus.FORBIDDEN
|
return jsonify({"message": str(e)}), HTTPStatus.FORBIDDEN
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
return jsonify({"message": str(e)}), HTTPStatus.INTERNAL_SERVER_ERROR
|
return jsonify({"message": str(e)}), HTTPStatus.INTERNAL_SERVER_ERROR
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user