Fix auth for listening invoices

This commit is contained in:
nicolas.dorier 2018-07-14 12:44:58 +09:00
parent 3ee1c05646
commit 0e1ef78af1
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -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)
{