mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Fix error message if invalid input lightning max value / min value. Increase cache of currency to 15 min
This commit is contained in:
@@ -236,6 +236,11 @@ namespace BTCPayServer.Controllers
|
|||||||
}
|
}
|
||||||
model.SetCryptoCurrencies(_ExplorerProvider, model.DefaultCryptoCurrency);
|
model.SetCryptoCurrencies(_ExplorerProvider, model.DefaultCryptoCurrency);
|
||||||
model.SetLanguages(_LangService, model.DefaultLang);
|
model.SetLanguages(_LangService, model.DefaultLang);
|
||||||
|
|
||||||
|
if(!ModelState.IsValid)
|
||||||
|
{
|
||||||
|
return View(model);
|
||||||
|
}
|
||||||
blob.DefaultLang = model.DefaultLang;
|
blob.DefaultLang = model.DefaultLang;
|
||||||
blob.AllowCoinConversion = model.AllowCoinConversion;
|
blob.AllowCoinConversion = model.AllowCoinConversion;
|
||||||
blob.LightningMaxValue = lightningMaxValue;
|
blob.LightningMaxValue = lightningMaxValue;
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ namespace BTCPayServer.Services.Rates
|
|||||||
|
|
||||||
public IRateProvider RateProvider { get; set; }
|
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 TimeSpan LongCacheSpan { get; set; } = TimeSpan.FromMinutes(15.0);
|
||||||
public IRateProvider GetRateProvider(BTCPayNetwork network, bool longCache)
|
public IRateProvider GetRateProvider(BTCPayNetwork network, bool longCache)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user