mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Adding setting in checkout experience for inclusion of private route hints
This commit is contained in:
@@ -381,6 +381,7 @@ namespace BTCPayServer.Controllers
|
|||||||
vm.OnChainMinValue = storeBlob.OnChainMinValue?.ToString() ?? "";
|
vm.OnChainMinValue = storeBlob.OnChainMinValue?.ToString() ?? "";
|
||||||
vm.LightningMaxValue = storeBlob.LightningMaxValue?.ToString() ?? "";
|
vm.LightningMaxValue = storeBlob.LightningMaxValue?.ToString() ?? "";
|
||||||
vm.LightningAmountInSatoshi = storeBlob.LightningAmountInSatoshi;
|
vm.LightningAmountInSatoshi = storeBlob.LightningAmountInSatoshi;
|
||||||
|
vm.LightningPrivateRouteHints = storeBlob.LightningPrivateRouteHints;
|
||||||
vm.RedirectAutomatically = storeBlob.RedirectAutomatically;
|
vm.RedirectAutomatically = storeBlob.RedirectAutomatically;
|
||||||
return View(vm);
|
return View(vm);
|
||||||
}
|
}
|
||||||
@@ -441,6 +442,7 @@ namespace BTCPayServer.Controllers
|
|||||||
blob.OnChainMinValue = onchainMinValue;
|
blob.OnChainMinValue = onchainMinValue;
|
||||||
blob.LightningMaxValue = lightningMaxValue;
|
blob.LightningMaxValue = lightningMaxValue;
|
||||||
blob.LightningAmountInSatoshi = model.LightningAmountInSatoshi;
|
blob.LightningAmountInSatoshi = model.LightningAmountInSatoshi;
|
||||||
|
blob.LightningPrivateRouteHints = model.LightningPrivateRouteHints;
|
||||||
blob.RedirectAutomatically = model.RedirectAutomatically;
|
blob.RedirectAutomatically = model.RedirectAutomatically;
|
||||||
if (CurrentStore.SetStoreBlob(blob))
|
if (CurrentStore.SetStoreBlob(blob))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ namespace BTCPayServer.Data
|
|||||||
[JsonConverter(typeof(CurrencyValueJsonConverter))]
|
[JsonConverter(typeof(CurrencyValueJsonConverter))]
|
||||||
public CurrencyValue LightningMaxValue { get; set; }
|
public CurrencyValue LightningMaxValue { get; set; }
|
||||||
public bool LightningAmountInSatoshi { get; set; }
|
public bool LightningAmountInSatoshi { get; set; }
|
||||||
|
public bool LightningPrivateRouteHints { get; set; }
|
||||||
|
|
||||||
public string CustomCSS { get; set; }
|
public string CustomCSS { get; set; }
|
||||||
public string CustomLogo { get; set; }
|
public string CustomLogo { get; set; }
|
||||||
|
|||||||
@@ -63,7 +63,10 @@ namespace BTCPayServer.Models.StoreViewModels
|
|||||||
|
|
||||||
[Display(Name = "Display lightning payment amounts in Satoshis")]
|
[Display(Name = "Display lightning payment amounts in Satoshis")]
|
||||||
public bool LightningAmountInSatoshi { get; set; }
|
public bool LightningAmountInSatoshi { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "Add hop hints for private channels to the lightning invoice")]
|
||||||
|
public bool LightningPrivateRouteHints { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Redirect invoice to redirect url automatically after paid")]
|
[Display(Name = "Redirect invoice to redirect url automatically after paid")]
|
||||||
public bool RedirectAutomatically { get; set; }
|
public bool RedirectAutomatically { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,12 @@
|
|||||||
<label asp-for="LightningAmountInSatoshi" class="form-check-label"></label>
|
<label asp-for="LightningAmountInSatoshi" class="form-check-label"></label>
|
||||||
<span asp-validation-for="LightningAmountInSatoshi" class="text-danger"></span>
|
<span asp-validation-for="LightningAmountInSatoshi" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-check">
|
||||||
|
<input asp-for="LightningPrivateRouteHints" type="checkbox" class="form-check-input" />
|
||||||
|
<label asp-for="LightningPrivateRouteHints" class="form-check-label"></label>
|
||||||
|
<span asp-validation-for="LightningPrivateRouteHints" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input asp-for="RedirectAutomatically" type="checkbox" class="form-check-input" />
|
<input asp-for="RedirectAutomatically" type="checkbox" class="form-check-input" />
|
||||||
<label asp-for="RedirectAutomatically" class="form-check-label"></label>
|
<label asp-for="RedirectAutomatically" class="form-check-label"></label>
|
||||||
|
|||||||
Reference in New Issue
Block a user