mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Fix bug of lightning invoice notification spam at startup
This commit is contained in:
parent
c60966c725
commit
daad1bdd25
1 changed files with 2 additions and 2 deletions
|
@ -168,10 +168,10 @@ namespace BTCPayServer.Payments.Lightning.CLightning
|
|||
|
||||
async Task<LightningInvoice> ILightningInvoiceClient.GetInvoice(string invoiceId, CancellationToken cancellation)
|
||||
{
|
||||
var invoices = await SendCommandAsync<ChargeInvoice[]>("listinvoices", new[] { invoiceId }, false, true, cancellation);
|
||||
var invoices = await SendCommandAsync<CreateInvoiceResponse[]>("listinvoices", new[] { invoiceId }, false, true, cancellation);
|
||||
if (invoices.Length == 0)
|
||||
return null;
|
||||
return ChargeClient.ToLightningInvoice(invoices[0]);
|
||||
return ToLightningInvoice(invoices[0]);
|
||||
}
|
||||
|
||||
static NBitcoin.DataEncoders.DataEncoder InvoiceIdEncoder = NBitcoin.DataEncoders.Encoders.Base58;
|
||||
|
|
Loading…
Add table
Reference in a new issue