feature: admin toggle to disable outgoing payments (#2909)

This commit is contained in:
Arc
2025-01-28 10:27:24 +02:00
committed by GitHub
parent 8633891485
commit eeebaffbed
5 changed files with 17 additions and 5 deletions
+2
View File
@@ -53,6 +53,8 @@ async def pay_invoice(
tag: str = "",
conn: Optional[Connection] = None,
) -> Payment:
if settings.lnbits_only_allow_incoming_payments:
raise PaymentError("Only incoming payments allowed.", status="failed")
invoice = _validate_payment_request(payment_request, max_sat)
assert invoice.amount_msat