mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Can inject currency data in CurrencyNameTable (#6276)
This commit is contained in:
21
BTCPayServer/Hosting/LoadCurrencyNameTableStartupTask.cs
Normal file
21
BTCPayServer/Hosting/LoadCurrencyNameTableStartupTask.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using BTCPayServer.Services.Rates;
|
||||
|
||||
namespace BTCPayServer.Hosting
|
||||
{
|
||||
public class LoadCurrencyNameTableStartupTask : IStartupTask
|
||||
{
|
||||
private readonly CurrencyNameTable _currencyNameTable;
|
||||
|
||||
public LoadCurrencyNameTableStartupTask(CurrencyNameTable currencyNameTable)
|
||||
{
|
||||
_currencyNameTable = currencyNameTable;
|
||||
}
|
||||
public async Task ExecuteAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _currencyNameTable.ReloadCurrencyData(cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user