Fix error message if invalid input lightning max value / min value. Increase cache of currency to 15 min

This commit is contained in:
nicolas.dorier
2018-04-03 17:54:50 +09:00
parent 325b359ff6
commit ecc5032bb2
2 changed files with 7 additions and 1 deletions

View File

@@ -236,6 +236,11 @@ namespace BTCPayServer.Controllers
}
model.SetCryptoCurrencies(_ExplorerProvider, model.DefaultCryptoCurrency);
model.SetLanguages(_LangService, model.DefaultLang);
if(!ModelState.IsValid)
{
return View(model);
}
blob.DefaultLang = model.DefaultLang;
blob.AllowCoinConversion = model.AllowCoinConversion;
blob.LightningMaxValue = lightningMaxValue;

View File

@@ -30,7 +30,8 @@ namespace BTCPayServer.Services.Rates
public IRateProvider RateProvider { get; set; }
public TimeSpan CacheSpan { get; set; } = TimeSpan.FromMinutes(1.0);
// We use 15 min because of limits with free version of bitcoinaverage
public TimeSpan CacheSpan { get; set; } = TimeSpan.FromMinutes(15.0);
public TimeSpan LongCacheSpan { get; set; } = TimeSpan.FromMinutes(15.0);
public IRateProvider GetRateProvider(BTCPayNetwork network, bool longCache)
{