Files
btcpayserver/BTCPayServer/Plugins/Webhooks/WebhooksTranslationProvider.cs
2025-10-19 22:31:24 +09:00

16 lines
537 B
C#

#nullable enable
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Plugins.Webhooks.Views;
using BTCPayServer.Services;
namespace BTCPayServer.Plugins.Webhooks;
public class WebhooksTranslationProvider(IEnumerable<AvailableWebhookViewModel> viewModels) : IDefaultTranslationProvider
{
public Task<KeyValuePair<string, string?>[]> GetDefaultTranslations()
=> Task.FromResult(viewModels.Select(vm => KeyValuePair.Create(vm.Description, vm.Description)).ToArray())!;
}