From 0e1ef78af1e96ffcb8a18d343e8a9a902923554c Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 14 Jul 2018 12:44:58 +0900 Subject: [PATCH] Fix auth for listening invoices --- BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs | 1 + BTCPayServer/Payments/Lightning/Lnd/LndSwaggerClient.partial.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs b/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs index e2115d0a5..ed5d28291 100644 --- a/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs +++ b/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs @@ -46,6 +46,7 @@ namespace BTCPayServer.Payments.Lightning.Lnd _Client = _Parent.CreateHttpClient(); _Client.Timeout = TimeSpan.FromMilliseconds(Timeout.Infinite); var request = new HttpRequestMessage(HttpMethod.Get, _Parent.BaseUrl.WithTrailingSlash() + "v1/invoices/subscribe"); + _Parent._Authentication.AddAuthentication(request); _Response = await _Client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, _Cts.Token); _Body = await _Response.Content.ReadAsStreamAsync(); _Reader = new StreamReader(_Body); diff --git a/BTCPayServer/Payments/Lightning/Lnd/LndSwaggerClient.partial.cs b/BTCPayServer/Payments/Lightning/Lnd/LndSwaggerClient.partial.cs index dad41b34a..3ad72ee10 100644 --- a/BTCPayServer/Payments/Lightning/Lnd/LndSwaggerClient.partial.cs +++ b/BTCPayServer/Payments/Lightning/Lnd/LndSwaggerClient.partial.cs @@ -69,7 +69,7 @@ namespace BTCPayServer.Payments.Lightning.Lnd }); } LndRestSettings _LndSettings; - LndAuthentication _Authentication; + internal LndAuthentication _Authentication; partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url) {