mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 17:36:59 +01:00
Store setting for allowing conversion through Shapeshift
This commit is contained in:
parent
d3befb5b86
commit
c36a900627
4 changed files with 18 additions and 2 deletions
|
@ -222,6 +222,7 @@ namespace BTCPayServer.Controllers
|
||||||
vm.InvoiceExpiration = storeBlob.InvoiceExpiration;
|
vm.InvoiceExpiration = storeBlob.InvoiceExpiration;
|
||||||
vm.RateMultiplier = (double)storeBlob.GetRateMultiplier();
|
vm.RateMultiplier = (double)storeBlob.GetRateMultiplier();
|
||||||
vm.PreferredExchange = storeBlob.PreferredExchange.IsCoinAverage() ? "coinaverage" : storeBlob.PreferredExchange;
|
vm.PreferredExchange = storeBlob.PreferredExchange.IsCoinAverage() ? "coinaverage" : storeBlob.PreferredExchange;
|
||||||
|
vm.AllowCoinConversion = storeBlob.AllowCoinConversion;
|
||||||
return View(vm);
|
return View(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +299,7 @@ namespace BTCPayServer.Controllers
|
||||||
blob.PreferredExchange = model.PreferredExchange;
|
blob.PreferredExchange = model.PreferredExchange;
|
||||||
|
|
||||||
blob.SetRateMultiplier(model.RateMultiplier);
|
blob.SetRateMultiplier(model.RateMultiplier);
|
||||||
|
blob.AllowCoinConversion = model.AllowCoinConversion;
|
||||||
|
|
||||||
if (store.SetStoreBlob(blob))
|
if (store.SetStoreBlob(blob))
|
||||||
{
|
{
|
||||||
|
|
|
@ -213,6 +213,10 @@ namespace BTCPayServer.Data
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
public bool AllowCoinConversion
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
[DefaultValue(60)]
|
[DefaultValue(60)]
|
||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
|
||||||
public int MonitoringExpiration
|
public int MonitoringExpiration
|
||||||
|
|
|
@ -94,6 +94,12 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Display(Name = "Allow conversion through third party (Shapeshift, Changelly...)")]
|
||||||
|
public bool AllowCoinConversion
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
public string StatusMessage
|
public string StatusMessage
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|
|
@ -70,6 +70,10 @@
|
||||||
</select>
|
</select>
|
||||||
<span asp-validation-for="SpeedPolicy" class="text-danger"></span>
|
<span asp-validation-for="SpeedPolicy" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="AllowCoinConversion"></label>
|
||||||
|
<input asp-for="AllowCoinConversion" type="checkbox" class="form-check" />
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<h5>Derivation Scheme</h5>
|
<h5>Derivation Scheme</h5>
|
||||||
<span>The DerivationScheme represents the destination of the funds received by your invoice on chain.</span>
|
<span>The DerivationScheme represents the destination of the funds received by your invoice on chain.</span>
|
||||||
|
|
Loading…
Add table
Reference in a new issue