fix breez and add blink

This commit is contained in:
Kukks
2023-12-07 10:50:10 +01:00
parent 96b2d273de
commit 5f62988f01
12 changed files with 876 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
#nullable enable
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Abstractions.Services;
using BTCPayServer.Lightning;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Plugins.Blink
{
public class BlinkPlugin : BaseBTCPayServerPlugin
{
public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } =
{
new() {Identifier = nameof(BTCPayServer), Condition = ">=1.12.0"}
};
public override void Execute(IServiceCollection applicationBuilder)
{
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("Blink/LNPaymentMethodSetupTab", "ln-payment-method-setup-tab"));
applicationBuilder.AddSingleton<ILightningConnectionStringHandler>(provider => provider.GetRequiredService<BlinkLightningConnectionStringHandler>());
applicationBuilder.AddSingleton<BlinkLightningConnectionStringHandler>();
base.Execute(applicationBuilder);
}
}
}