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
+3 -5
View File
@@ -70,11 +70,9 @@ async def lnurl_callback(address_id, amount: int = Query(...)):
json={
"out": False,
"amount": int(amount_received / 1000),
"description_hash": hashlib.sha256(
(await address.lnurlpay_metadata(domain=domain.domain)).encode(
"utf-8"
)
).hexdigest(),
"description_hash": (
await address.lnurlpay_metadata(domain=domain.domain)
).encode("utf-8"),
"extra": {"tag": f"Payment to {address.username}@{domain.domain}"},
},
timeout=40,