Mega-merge 2: Invoice/refactor description hash (WIP) (#814)

* description hashing in backend
This commit is contained in:
calle
2022-08-01 16:20:25 +02:00
committed by GitHub
parent c88e6b0e62
commit f1ec7e33f0
18 changed files with 40 additions and 41 deletions
+6 -4
View File
@@ -184,11 +184,13 @@ async def api_payments_create_invoice(data: CreateInvoiceData, wallet: Wallet):
lnurl_response: Union[None, bool, str] = None
if data.lnurl_callback:
if "lnurl_balance_check" in data:
assert (
data.lnurl_balance_check is not None
), "lnurl_balance_check is required"
if data.lnurl_balance_check is not None:
await save_balance_check(wallet.id, data.lnurl_balance_check)
else:
raise HTTPException(
status_code=HTTPStatus.BAD_REQUEST,
detail="lnurl_balance_check not set.",
)
async with httpx.AsyncClient() as client:
try: