Store can customize rate source

This commit is contained in:
nicolas.dorier
2018-01-19 16:00:20 +09:00
parent fe25e00c94
commit 198e810355
10 changed files with 113 additions and 9 deletions

View File

@@ -47,6 +47,17 @@ namespace BTCPayServer.Models.StoreViewModels
public List<StoreViewModel.DerivationScheme> DerivationSchemes { get; set; } = new List<StoreViewModel.DerivationScheme>();
[Display(Name = "Preferred exchange rate...")]
public string PreferredExchange { get; set; }
public string RateSource
{
get
{
return string.IsNullOrEmpty(PreferredExchange) ? "https://apiv2.bitcoinaverage.com/indices/global/ticker/short" : $"https://apiv2.bitcoinaverage.com/exchanges/{PreferredExchange}";
}
}
[Display(Name = "Multiply the original rate by ...")]
[Range(0.01, 10.0)]
public double RateMultiplier