From 25d40972be3450dc442309d4205fd7d736639b55 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Tue, 5 Oct 2021 18:47:25 +0200 Subject: [PATCH] Improve LNURL configuration --- .../StoreViewModels/LightningNodeViewModel.cs | 16 ++++- .../Views/Stores/SetupLightningNode.cshtml | 61 +++++++++++-------- 2 files changed, 47 insertions(+), 30 deletions(-) diff --git a/BTCPayServer/Models/StoreViewModels/LightningNodeViewModel.cs b/BTCPayServer/Models/StoreViewModels/LightningNodeViewModel.cs index eb713faf1..a29e65526 100644 --- a/BTCPayServer/Models/StoreViewModels/LightningNodeViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/LightningNodeViewModel.cs @@ -10,11 +10,22 @@ namespace BTCPayServer.Models.StoreViewModels public class LightningNodeViewModel { + [Display(Name = "Enable LNURL")] public bool LNURLEnabled { get; set; } = true; + + [Display(Name = "LNURL Classic Mode")] public bool LNURLBech32Mode { get; set; } = true; - public bool LNURLStandardInvoiceEnabled { get; set; } = false; - public bool LUD12Enabled { get; set; } = false; + + [Display(Name = "LNURL enabled for standard invoices")] + public bool LNURLStandardInvoiceEnabled { get; set; } + + [Display(Name = "Allow payee to pass a comment")] + public bool LUD12Enabled { get; set; } + + [Display(Name = "Do not offer BOLT11 for standard invoices")] + public bool DisableBolt11PaymentMethod { get; set; } public LightningNodeType LightningNodeType { get; set; } + [Display(Name = "Connection string")] public string ConnectionString { get; set; } public string CryptoCode { get; set; } @@ -22,6 +33,5 @@ namespace BTCPayServer.Models.StoreViewModels public bool SkipPortTest { get; set; } public bool Enabled { get; set; } = true; public string StoreId { get; set; } - public bool DisableBolt11PaymentMethod { get; set; } } } diff --git a/BTCPayServer/Views/Stores/SetupLightningNode.cshtml b/BTCPayServer/Views/Stores/SetupLightningNode.cshtml index 83403b379..cb3499f1b 100644 --- a/BTCPayServer/Views/Stores/SetupLightningNode.cshtml +++ b/BTCPayServer/Views/Stores/SetupLightningNode.cshtml @@ -63,15 +63,6 @@ padding: .75rem 1rem; border-radius: 4px; } - .lnurl-setup { - display: none; - } - #LNURLEnabled:checked + * , - #LNURLEnabled:checked + * + *, - #LNURLEnabled:checked + * + * + *, - #LNURLEnabled:checked + * + * + * + *{ - display: block; - } } @@ -187,26 +178,42 @@ - +
- - -
- - - +
+ +
-
- - -
-
- - -
-
- - +
+
LNURL settings
+
+
+ + + +
+

For wallet compatibility: Bech32 encoded (classic) vs. cleartext URL (upcoming)

+
+
+
+ + +
+

Required for Lightning Address, the pay button and apps.

+
+
+
+ + +
+

Performance: Turn it off if users should pay only via LNURL.

+
+
+
+ + +
+