diff --git a/BTCPayServer.Tests/SeleniumTests.cs b/BTCPayServer.Tests/SeleniumTests.cs index 7fb42e173..c51c57da7 100644 --- a/BTCPayServer.Tests/SeleniumTests.cs +++ b/BTCPayServer.Tests/SeleniumTests.cs @@ -301,11 +301,12 @@ namespace BTCPayServer.Tests await s.StartAsync(); var alice = s.RegisterNewUser(); var storeData = s.CreateNewStore(); + var onchainHint = "A store requires a wallet to receive on-chain payments."; + var offchainHint = "A connection to a Lightning node is required if you want to receive Lightning payments."; + // verify that hints are displayed on the store page - Assert.True(s.Driver.PageSource.Contains("Wallet not setup for the store, please provide Derviation Scheme"), - "Wallet hint not present"); - Assert.True(s.Driver.PageSource.Contains("Review settings if you want to receive Lightning payments"), - "Lightning hint not present"); + Assert.True(s.Driver.PageSource.Contains(onchainHint), "Wallet hint not present"); + Assert.True(s.Driver.PageSource.Contains(offchainHint), "Lightning hint not present"); s.GoToStores(); Assert.True(s.Driver.PageSource.Contains("warninghint_" + storeData.storeId), @@ -314,7 +315,7 @@ namespace BTCPayServer.Tests s.GoToStore(storeData.storeId); s.AddDerivationScheme(); // wallet hint should be dismissed s.Driver.AssertNoError(); - Assert.False(s.Driver.PageSource.Contains("Wallet not setup for the store, please provide Derviation Scheme"), + Assert.False(s.Driver.PageSource.Contains(onchainHint), "Wallet hint not dismissed on derivation scheme add"); s.Driver.FindElement(By.Id("dismissLightningHint")).Click(); // dismiss lightning hint @@ -380,8 +381,7 @@ namespace BTCPayServer.Tests s.Driver.FindElement(By.Id("Stores")).Click(); // there shouldn't be any hints now - Assert.False(s.Driver.PageSource.Contains("Review settings if you want to receive Lightning payments"), - "Lightning hint should be dismissed at this point"); + Assert.False(s.Driver.PageSource.Contains(offchainHint), "Lightning hint should be dismissed at this point"); s.Driver.FindElement(By.LinkText("Remove")).Click(); s.Driver.FindElement(By.Id("continue")).Click(); diff --git a/BTCPayServer/Models/StoreViewModels/StoreViewModel.cs b/BTCPayServer/Models/StoreViewModels/StoreViewModel.cs index ebe87c67f..93d2d1a5c 100644 --- a/BTCPayServer/Models/StoreViewModels/StoreViewModel.cs +++ b/BTCPayServer/Models/StoreViewModels/StoreViewModel.cs @@ -30,6 +30,7 @@ namespace BTCPayServer.Models.StoreViewModels } public bool CanDelete { get; set; } + [Display(Name = "Store ID")] public string Id { get; set; } [Display(Name = "Store Name")] [Required] diff --git a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml index 6b1b0943d..2c847a420 100644 --- a/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml +++ b/BTCPayServer/Views/Stores/AddDerivationScheme.cshtml @@ -73,10 +73,12 @@
- The derivation scheme represents the destination of the funds received by your invoice. - It is generated by your wallet software. + A derivation scheme facilitates generation of the destination addresses for your invoices so funds can be received on-chain.
- - Wallet not setup for the store, please provide Derviation Scheme - +
+ A store requires a wallet to receive on-chain payments. + Optionally, you can have a store that only receives Lightning payments, see the next section for more details.
- } -- The Derivation Scheme - facilitates generation of the destination addresses for your invoices so funds can be received on-chain. -
-- Until wallet is defined, no invoices can be created for this store. - Optionally, you can have a store that only receives Lightning payments, see the next section for more details. -
- -| Crypto | -Derivation Scheme | -Enabled | -Actions | + + + } +||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Crypto | +Derivation Scheme | +Enabled | +Actions | +
|---|---|---|---|
| + @scheme.Crypto + @if (!string.IsNullOrWhiteSpace(scheme.Value) && scheme.WalletSupported) + { + - + Wallet + } + | +
+ @if (string.IsNullOrEmpty(scheme.Value))
+ {
+ Not set
+ }
+ else
+ {
+
+ @scheme.Value
+
+
+ @if (scheme.Value.Length > 20)
+ {
+ var match = Regex.Match(scheme.Value, @"((?:-\[(?:[^\]])+\])+|\S{6})$");
+ @match.Value;
+ }
+
+ }
+ |
+ + @if (scheme.Enabled) + { + + } + else + { + + } + | ++ + @(scheme.Enabled ? "Modify" : "Setup") + + |
| + | |||
+ A connection to a Lightning node is required if you want to receive Lightning payments. +
+ +| Crypto | +Address | +Enabled | +Actions | +
|---|---|---|---|
| @scheme.Crypto | -
- @if (string.IsNullOrEmpty(scheme.Value))
- {
- Not set
- }
- else
- {
-
- @scheme.Value
-
-
- @if (scheme.Value.Length > 20)
- {
- var match = Regex.Match(scheme.Value, @"((?:-\[(?:[^\]])+\])+|\S{6})$");
- @match.Value;
- }
-
- }
- |
- - @if (scheme.Enabled) - { - - } - else - { - - } - | -- @if (!string.IsNullOrWhiteSpace(scheme.Value) && scheme.WalletSupported) - { - Wallet - - } - Modify - | -
| - | |||
- - Review settings if you want to receive Lightning payments - -
- } -- A connection to a Lightning Node is required to generate Lightning Network enabled invoices. -
- -| Crypto | -Address | -Enabled | -Actions | +@scheme.CryptoCode | +@scheme.Address | ++ @if (scheme.Enabled) + { + + } + else + { + + } + | ++ + @(scheme.Enabled ? "Modify" : "Setup") + + |
|---|---|---|---|---|---|---|---|
| @scheme.CryptoCode | -@scheme.Address | -- @if (scheme.Enabled) - { - - } - else - { - - } - | -Modify | -