From a32e43b2bb90ccbdbef583cb3402c2ba53a34916 Mon Sep 17 00:00:00 2001 From: Tiago vasconcelos Date: Thu, 5 Aug 2021 10:31:25 +0100 Subject: [PATCH] fix having LND_GRPC_MACAROON as HEXSTRING issue #268 --- lnbits/wallets/lndgrpc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lnbits/wallets/lndgrpc.py b/lnbits/wallets/lndgrpc.py index 25c9b2830..99ff3637a 100644 --- a/lnbits/wallets/lndgrpc.py +++ b/lnbits/wallets/lndgrpc.py @@ -190,7 +190,11 @@ class LndWallet(Wallet): ln.Invoice, ), ) - macaroon = load_macaroon(self.macaroon_path) + + if self.macaroon_path.split('.')[-1] == 'macaroon': + macaroon = load_macaroon(self.macaroon_path) + else: + macaroon = self.macaroon_path async for inv in subscribe_invoices( ln.InvoiceSubscription(),