From 77b42eb0855f378e7f15bee7389bf74a072ccf0b Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 11 Apr 2018 18:42:19 +0900 Subject: [PATCH] Do not forget to pass expiry to createinvoice on clightning --- .../Payments/Lightning/CLightning/CLightningRPCClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Payments/Lightning/CLightning/CLightningRPCClient.cs b/BTCPayServer/Payments/Lightning/CLightning/CLightningRPCClient.cs index 00c32b84a..79f539a1b 100644 --- a/BTCPayServer/Payments/Lightning/CLightning/CLightningRPCClient.cs +++ b/BTCPayServer/Payments/Lightning/CLightning/CLightningRPCClient.cs @@ -177,7 +177,7 @@ namespace BTCPayServer.Payments.Lightning.CLightning async Task ILightningInvoiceClient.CreateInvoice(LightMoney amount, string description, TimeSpan expiry, CancellationToken cancellation) { var id = InvoiceIdEncoder.EncodeData(RandomUtils.GetBytes(20)); - var invoice = await SendCommandAsync("invoice", new object[] { amount.MilliSatoshi, id, description ?? "" }, cancellation: cancellation); + var invoice = await SendCommandAsync("invoice", new object[] { amount.MilliSatoshi, id, description ?? "", Math.Max(0, (int)expiry.TotalSeconds) }, cancellation: cancellation); invoice.Label = id; invoice.MilliSatoshi = amount; invoice.Status = "unpaid";