TEST: fix tests for real wallets (#1761)

* fix tests for real wallets
* change realinvoice provider to lnd-1
* use lnd-3 for tests
* fix eclair tests
* use bullseye in dockerimage
This commit is contained in:
dni ⚡
2023-06-15 12:36:28 +02:00
committed by GitHub
parent 8ed2422ade
commit c48e2329c5
5 changed files with 22 additions and 20 deletions
+5 -4
View File
@@ -3,7 +3,7 @@ import base64
import hashlib
import json
import urllib.parse
from typing import AsyncGenerator, Dict, Optional
from typing import Any, AsyncGenerator, Dict, Optional
import httpx
from loguru import logger
@@ -70,18 +70,19 @@ class EclairWallet(Wallet):
**kwargs,
) -> InvoiceResponse:
data: Dict = {
data: Dict[str, Any] = {
"amountMsat": amount * 1000,
"description_hash": b"",
"description": memo,
}
if kwargs.get("expiry"):
data["expireIn"] = kwargs["expiry"]
# Either 'description' (string) or 'descriptionHash' must be supplied
if description_hash:
data["descriptionHash"] = description_hash.hex()
elif unhashed_description:
data["descriptionHash"] = hashlib.sha256(unhashed_description).hexdigest()
else:
data["description"] = memo
async with httpx.AsyncClient() as client:
r = await client.post(