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
+2 -1
View File
@@ -1,5 +1,6 @@
import asyncio
import base64
import hashlib
import json
import urllib.parse
from os import getenv
@@ -72,7 +73,7 @@ class EclairWallet(Wallet):
data: Dict = {"amountMsat": amount * 1000}
if description_hash:
data["description_hash"] = description_hash.hex()
data["description_hash"] = hashlib.sha256(description_hash).hexdigest()
else:
data["description"] = memo or ""