change settings in wallets

This commit is contained in:
dni ⚡
2022-10-05 13:05:11 +02:00
parent bf566c5a26
commit ad81bb322a
10 changed files with 50 additions and 48 deletions
+2 -3
View File
@@ -3,7 +3,6 @@ import base64
import hashlib
import json
import urllib.parse
from os import getenv
from typing import AsyncGenerator, Dict, Optional
import httpx
@@ -37,12 +36,12 @@ class UnknownError(Exception):
class EclairWallet(Wallet):
def __init__(self):
url = getenv("ECLAIR_URL")
url = settings.eclair_url
self.url = url[:-1] if url.endswith("/") else url
self.ws_url = f"ws://{urllib.parse.urlsplit(self.url).netloc}/ws"
passw = getenv("ECLAIR_PASS")
passw = settings.eclair_pass
encodedAuth = base64.b64encode(f":{passw}".encode("utf-8"))
auth = str(encodedAuth, "utf-8")
self.auth = {"Authorization": f"Basic {auth}"}