mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-20 23:44:21 +01:00
Do not crash if can't load rate cache
This commit is contained in:
@@ -114,6 +114,8 @@ namespace BTCPayServer.HostedServices
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async Task TryLoadRateCache()
|
private async Task TryLoadRateCache()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var cache = await _SettingsRepository.GetSettingAsync<ExchangeRatesCache>();
|
var cache = await _SettingsRepository.GetSettingAsync<ExchangeRatesCache>();
|
||||||
if (cache != null)
|
if (cache != null)
|
||||||
@@ -130,6 +132,8 @@ namespace BTCPayServer.HostedServices
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
DateTimeOffset? _LastCacheDate;
|
DateTimeOffset? _LastCacheDate;
|
||||||
private async Task SaveRateCache()
|
private async Task SaveRateCache()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.0.3.157</Version>
|
<Version>1.0.3.158</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user