relax hardening: don't block lookup calls without payment_hash or invoice

This commit is contained in:
Riccardo Balbo 2025-06-23 12:10:19 +02:00 • committed by Riccardo Balbo
commit ce4b4a5530

View file

@ -323,8 +323,10 @@ async def _on_lookup_invoice(
payment_hash = invoice_data.payment_hash
# hardening #
assert_valid_sha256(payment_hash)
assert_valid_bolt11(invoice)
if payment_hash:
assert_valid_sha256(payment_hash)
if invoice:
assert_valid_bolt11(invoice)
# ## #
# Get payment data