From 541324b2bd1fee016326704a4c32464682d8fc03 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:34:36 +0200 Subject: [PATCH] warning messages (#562) --- cashu/lightning/lndrest.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cashu/lightning/lndrest.py b/cashu/lightning/lndrest.py index 3b464d0..3274da9 100644 --- a/cashu/lightning/lndrest.py +++ b/cashu/lightning/lndrest.py @@ -49,22 +49,19 @@ class LndRestWallet(LightningBackend): ) if not endpoint: - raise Exception("cannot initialize lndrest: no endpoint") + raise Exception("cannot initialize LndRestWallet: no endpoint") if not macaroon: - raise Exception("cannot initialize lndrest: no macaroon") + raise Exception("cannot initialize LndRestWallet: no macaroon") if not cert: logger.warning( - "no certificate for lndrest provided, this only works if you have a" + "no certificate for LndRestWallet provided, this only works if you have a" " publicly issued certificate" ) if not cert_verify: - logger.warning( - "certificate validation will be disabled for lndrest" - ) - + logger.warning("certificate validation will be disabled for LndRestWallet") endpoint = endpoint[:-1] if endpoint.endswith("/") else endpoint endpoint = ( @@ -82,7 +79,6 @@ class LndRestWallet(LightningBackend): if not cert_verify: self.cert = False - self.auth = {"Grpc-Metadata-macaroon": self.macaroon} self.client = httpx.AsyncClient( base_url=self.endpoint, headers=self.auth, verify=self.cert