Do not crash if can't load rate cache

This commit is contained in:
nicolas.dorier
2020-02-16 22:07:35 +09:00
parent 143c909812
commit c03dc48fe9
2 changed files with 13 additions and 9 deletions

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>1.0.3.157</Version> <Version>1.0.3.158</Version>
</PropertyGroup> </PropertyGroup>
</Project> </Project>