diff --git a/BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs b/BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs index e4bc9a86f..695c0c960 100644 --- a/BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs +++ b/BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs @@ -128,9 +128,13 @@ namespace BTCPayServer.Payments.Lightning } paymentPrompt.Destination = lightningInvoice.BOLT11; + var paymentHash = lightningInvoice.PaymentHash != null ? + uint256.Parse(lightningInvoice.PaymentHash) : + BOLT11PaymentRequest.Parse(lightningInvoice.BOLT11, _Network.NBitcoinNetwork).PaymentHash; + var details = new LigthningPaymentPromptDetails { - PaymentHash = BOLT11PaymentRequest.Parse(lightningInvoice.BOLT11, _Network.NBitcoinNetwork).PaymentHash, + PaymentHash = paymentHash, Preimage = string.IsNullOrEmpty(lightningInvoice.Preimage) ? null : uint256.Parse(lightningInvoice.Preimage), InvoiceId = lightningInvoice.Id, NodeInfo = (await nodeInfo).FirstOrDefault()?.ToString()