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 -1
View File
@@ -132,7 +132,9 @@ class LndWallet(Wallet):
params: Dict = {"value": amount, "expiry": 600, "private": True}
if description_hash:
params["description_hash"] = description_hash # as bytes directly
params["description_hash"] = base64.b64encode(
hashlib.sha256(description_hash).digest()
) # as bytes directly
else:
params["memo"] = memo or ""