mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
fix tests
This commit is contained in:
parent
5efac45d46
commit
85efc3b00c
1 changed files with 3 additions and 1 deletions
|
@ -16,10 +16,12 @@ namespace BTCPayServer.HostedServices
|
|||
public RatesHostedService(SettingsRepository repo, IRateProviderFactory rateProviderFactory)
|
||||
{
|
||||
this._SettingsRepository = repo;
|
||||
_RateProviderFactory = (BTCPayRateProviderFactory)rateProviderFactory;
|
||||
_RateProviderFactory = rateProviderFactory as BTCPayRateProviderFactory;
|
||||
}
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
if (_RateProviderFactory == null)
|
||||
return;
|
||||
var rates = (await _SettingsRepository.GetSettingAsync<RatesSetting>()) ?? new RatesSetting();
|
||||
_RateProviderFactory.CacheSpan = TimeSpan.FromMinutes(rates.CacheInMinutes);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue