From 2bd12386685b7b6075c1a804d0864d24e5ff8618 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Thu, 31 May 2018 16:31:00 -0500 Subject: [PATCH] Rounding TotalSeconds expiry so it doesn't break invoice creation --- BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs b/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs index 0de32243e..7a86c4b20 100644 --- a/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs +++ b/BTCPayServer/Payments/Lightning/Lnd/LndInvoiceClient.cs @@ -28,7 +28,7 @@ namespace BTCPayServer.Payments.Lightning.Lnd CancellationToken cancellation = default(CancellationToken)) { var strAmount = ConvertInv.ToString(amount.ToUnit(LightMoneyUnit.Satoshi)); - var strExpiry = ConvertInv.ToString(expiry.TotalSeconds); + var strExpiry = ConvertInv.ToString(Math.Round(expiry.TotalSeconds, 0)); // lnd requires numbers sent as strings. don't ask var resp = await _rpcClient.AddInvoiceAsync(new LnrpcInvoice {