What changed, and why it matters
This commit removes unused C# 'using' statements (imported namespaces) and one unused Razor view import across 372 files. It is a code-cleanup change with no functional modifications. The only non-cleanup hunk is a tiny refactor in GreenfieldInvoiceController.UpdateInvoice that reorders an existing null check and variable assignment without changing behavior.
No security action required. Treat as routine hygiene/cleanup. If reviewing, verify the build still compiles and that no required using was accidentally removed (the diff shows only removals, so compiler/tests will confirm).
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is almost entirely deletion of unused namespace imports (System, Newtonsoft.Json, Microsoft.AspNetCore.*, NBitcoin, etc.) and a few unused Razor @using directives. No APIs, logic, authorization checks, or data flows are altered. In GreenfieldInvoiceController.cs the UpdateInvoice method was slightly rewritten: it now checks HttpContext.GetInvoiceData() for null before calling _invoiceRepository.UpdateInvoiceMetadata and assigning the result to ‘invoice’. The previous code assigned the context invoice to ‘invoice’ first, then returned InvoiceNotFound() if null. The observable behavior is identical because the action still returns InvoiceNotFound() when no invoice exists and still returns Ok(ToModel(invoice)) otherwise. No security boundary is crossed.
Changed components
BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs372 files with removed unused namespace importsInspect captured patch +9 / −883
diff --git a/BTCPayServer.Abstractions/Contracts/VersionCondition.cs b/BTCPayServer.Abstractions/Contracts/VersionCondition.cs
index bb32434..4ffa923 100644
--- a/BTCPayServer.Abstractions/Contracts/VersionCondition.cs
+++ b/BTCPayServer.Abstractions/Contracts/VersionCondition.cs
@@ -2,7 +2,6 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Text.RegularExpressions;
namespace BTCPayServer.Abstractions.Contracts;
diff --git a/BTCPayServer.Abstractions/Form/Field.cs b/BTCPayServer.Abstractions/Form/Field.cs
index d9e0e1c..d837875 100644
--- a/BTCPayServer.Abstractions/Form/Field.cs
+++ b/BTCPayServer.Abstractions/Form/Field.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNetCore.Mvc.ModelBinding;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer.Abstractions/Form/Form.cs b/BTCPayServer.Abstractions/Form/Form.cs
index f6e46af..125bd9c 100644
--- a/BTCPayServer.Abstractions/Form/Form.cs
+++ b/BTCPayServer.Abstractions/Form/Form.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
-using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer.Abstractions/Models/LayoutModel.cs b/BTCPayServer.Abstractions/Models/LayoutModel.cs
index 7002f35..69b057d 100644
--- a/BTCPayServer.Abstractions/Models/LayoutModel.cs
+++ b/BTCPayServer.Abstractions/Models/LayoutModel.cs
@@ -1,6 +1,4 @@
#nullable enable
-using NBitcoin;
-
namespace BTCPayServer.Abstractions.Models;
public record WellKnownCategories(string CategoryId)
diff --git a/BTCPayServer.Abstractions/Models/UploadImageResultModel.cs b/BTCPayServer.Abstractions/Models/UploadImageResultModel.cs
index 06735fe..2fd61c4 100644
--- a/BTCPayServer.Abstractions/Models/UploadImageResultModel.cs
+++ b/BTCPayServer.Abstractions/Models/UploadImageResultModel.cs
@@ -1,9 +1,4 @@
#nullable enable
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Models;
diff --git a/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs b/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs
index 49e0c6c..400548c 100644
--- a/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs
+++ b/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs
@@ -1,12 +1,5 @@
using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
using System.Text.Encodings.Web;
-using Microsoft.AspNetCore.Html;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
-using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
diff --git a/BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs b/BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs
index b55b210..e71dc20 100644
--- a/BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs
+++ b/BTCPayServer.Abstractions/TagHelpers/UrlResolutionTagHelper2.cs
@@ -5,7 +5,6 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Html;
-using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
diff --git a/BTCPayServer.Client/BTCPayServerClient.ServerEmail.cs b/BTCPayServer.Client/BTCPayServerClient.ServerEmail.cs
index c6fc01c..8d15229 100644
--- a/BTCPayServer.Client/BTCPayServerClient.ServerEmail.cs
+++ b/BTCPayServer.Client/BTCPayServerClient.ServerEmail.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
diff --git a/BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs b/BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs
index 33aa459..bc74705 100644
--- a/BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs
+++ b/BTCPayServer.Client/JsonConverters/SaneOutpointJsonConverter.cs
@@ -1,5 +1,4 @@
using NBitcoin;
-using NBitcoin.DataEncoders;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
using System;
diff --git a/BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs b/BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs
index 80f1224..40e5191 100644
--- a/BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs
+++ b/BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs
@@ -1,6 +1,5 @@
using System;
using BTCPayServer.Lightning;
-using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
diff --git a/BTCPayServer.Client/Models/GreenfieldPermissionAPIError.cs b/BTCPayServer.Client/Models/GreenfieldPermissionAPIError.cs
index 191410f..b87734f 100644
--- a/BTCPayServer.Client/Models/GreenfieldPermissionAPIError.cs
+++ b/BTCPayServer.Client/Models/GreenfieldPermissionAPIError.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace BTCPayServer.Client.Models
{
public class GreenfieldPermissionAPIError : GreenfieldAPIError
diff --git a/BTCPayServer.Client/Models/Language.cs b/BTCPayServer.Client/Models/Language.cs
index 9e1ac14..52444f3 100644
--- a/BTCPayServer.Client/Models/Language.cs
+++ b/BTCPayServer.Client/Models/Language.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
diff --git a/BTCPayServer.Client/Models/OpenLightningChannelRequest.cs b/BTCPayServer.Client/Models/OpenLightningChannelRequest.cs
index afa482f..3f5acc5 100644
--- a/BTCPayServer.Client/Models/OpenLightningChannelRequest.cs
+++ b/BTCPayServer.Client/Models/OpenLightningChannelRequest.cs
@@ -1,5 +1,4 @@
using BTCPayServer.Client.JsonConverters;
-using BTCPayServer.Lightning;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
diff --git a/BTCPayServer.Client/Models/PayPaymentRequestRequest.cs b/BTCPayServer.Client/Models/PayPaymentRequestRequest.cs
index 8ff3da6..939add0 100644
--- a/BTCPayServer.Client/Models/PayPaymentRequestRequest.cs
+++ b/BTCPayServer.Client/Models/PayPaymentRequestRequest.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
diff --git a/BTCPayServer.Client/Models/RegisterBoltcardRequest.cs b/BTCPayServer.Client/Models/RegisterBoltcardRequest.cs
index d9958d5..1f53717 100644
--- a/BTCPayServer.Client/Models/RegisterBoltcardRequest.cs
+++ b/BTCPayServer.Client/Models/RegisterBoltcardRequest.cs
@@ -1,6 +1,4 @@
-using System;
using System.Collections.Generic;
-using System.Text;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
diff --git a/BTCPayServer.Client/Models/StoreData.cs b/BTCPayServer.Client/Models/StoreData.cs
index f2ffac2..2f26b65 100644
--- a/BTCPayServer.Client/Models/StoreData.cs
+++ b/BTCPayServer.Client/Models/StoreData.cs
@@ -1,6 +1,4 @@
-using System;
using System.Collections.Generic;
-using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
diff --git a/BTCPayServer.Client/Models/StoreReportRequest.cs b/BTCPayServer.Client/Models/StoreReportRequest.cs
index f9c7b4c..583f3b9 100644
--- a/BTCPayServer.Client/Models/StoreReportRequest.cs
+++ b/BTCPayServer.Client/Models/StoreReportRequest.cs
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
-using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models;
diff --git a/BTCPayServer.Client/Models/StoreReportsResponse.cs b/BTCPayServer.Client/Models/StoreReportsResponse.cs
index 514dfbb..1fee77b 100644
--- a/BTCPayServer.Client/Models/StoreReportsResponse.cs
+++ b/BTCPayServer.Client/Models/StoreReportsResponse.cs
@@ -1,7 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
namespace BTCPayServer.Client.Models
{
public class StoreReportsResponse
diff --git a/BTCPayServer.Client/Models/StoreWebhookData.cs b/BTCPayServer.Client/Models/StoreWebhookData.cs
index 5fce447..3edef30 100644
--- a/BTCPayServer.Client/Models/StoreWebhookData.cs
+++ b/BTCPayServer.Client/Models/StoreWebhookData.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
diff --git a/BTCPayServer.Client/Models/WebhookDeliveryData.cs b/BTCPayServer.Client/Models/WebhookDeliveryData.cs
index c995f27..6a153b5 100644
--- a/BTCPayServer.Client/Models/WebhookDeliveryData.cs
+++ b/BTCPayServer.Client/Models/WebhookDeliveryData.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Text;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
diff --git a/BTCPayServer.Client/Models/WebhookDeliveryStatus.cs b/BTCPayServer.Client/Models/WebhookDeliveryStatus.cs
index dde4b52..d53e1c7 100644
--- a/BTCPayServer.Client/Models/WebhookDeliveryStatus.cs
+++ b/BTCPayServer.Client/Models/WebhookDeliveryStatus.cs
@@ -1,7 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
namespace BTCPayServer.Client.Models
{
public enum WebhookDeliveryStatus
diff --git a/BTCPayServer.Client/Models/WebhookEvent.cs b/BTCPayServer.Client/Models/WebhookEvent.cs
index e8c130d..49fac7c 100644
--- a/BTCPayServer.Client/Models/WebhookEvent.cs
+++ b/BTCPayServer.Client/Models/WebhookEvent.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
-using System.Text;
using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
diff --git a/BTCPayServer.Client/Models/WebhookSubscriptionEvent.cs b/BTCPayServer.Client/Models/WebhookSubscriptionEvent.cs
index b944d17..f43c3a3 100644
--- a/BTCPayServer.Client/Models/WebhookSubscriptionEvent.cs
+++ b/BTCPayServer.Client/Models/WebhookSubscriptionEvent.cs
@@ -1,9 +1,4 @@
-using System;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Converters;
-
-namespace BTCPayServer.Client.Models;
+namespace BTCPayServer.Client.Models;
public class WebhookSubscriptionEvent : StoreWebhookEvent
{
diff --git a/BTCPayServer.Client/Permissions.cs b/BTCPayServer.Client/Permissions.cs
index 3114f5d..c801750 100644
--- a/BTCPayServer.Client/Permissions.cs
+++ b/BTCPayServer.Client/Permissions.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
using System.Text.RegularExpressions;
namespace BTCPayServer.Client
diff --git a/BTCPayServer.Common/SelectedChains.cs b/BTCPayServer.Common/SelectedChains.cs
index 1ec4231..a52da88 100644
--- a/BTCPayServer.Common/SelectedChains.cs
+++ b/BTCPayServer.Common/SelectedChains.cs
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using BTCPayServer.Logging;
using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.Logging;
namespace BTCPayServer
{
diff --git a/BTCPayServer.Data/ApplicationDbContextExtensions.cs b/BTCPayServer.Data/ApplicationDbContextExtensions.cs
index b8bb1b8..6969fae 100644
--- a/BTCPayServer.Data/ApplicationDbContextExtensions.cs
+++ b/BTCPayServer.Data/ApplicationDbContextExtensions.cs
@@ -1,7 +1,6 @@
#nullable enable
using System;
using System.Data.Common;
-using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
diff --git a/BTCPayServer.Data/CustomerSelector.cs b/BTCPayServer.Data/CustomerSelector.cs
index ed60714..432ba9c 100644
--- a/BTCPayServer.Data/CustomerSelector.cs
+++ b/BTCPayServer.Data/CustomerSelector.cs
@@ -1,9 +1,7 @@
#nullable enable
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
-using BTCPayServer.Data.Subscriptions;
namespace BTCPayServer.Data;
diff --git a/BTCPayServer.Data/DBScriptsMigration.cs b/BTCPayServer.Data/DBScriptsMigration.cs
index 1cde23d..26269c7 100644
--- a/BTCPayServer.Data/DBScriptsMigration.cs
+++ b/BTCPayServer.Data/DBScriptsMigration.cs
@@ -1,10 +1,8 @@
using System;
-using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
-using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Data
diff --git a/BTCPayServer.Data/Data/AddressInvoiceData.cs b/BTCPayServer.Data/Data/AddressInvoiceData.cs
index 89fc2d3..18f4398 100644
--- a/BTCPayServer.Data/Data/AddressInvoiceData.cs
+++ b/BTCPayServer.Data/Data/AddressInvoiceData.cs
@@ -1,6 +1,4 @@
-using System;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Internal;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/BaseEntityData.cs b/BTCPayServer.Data/Data/BaseEntityData.cs
index a997074..62a9f15 100644
--- a/BTCPayServer.Data/Data/BaseEntityData.cs
+++ b/BTCPayServer.Data/Data/BaseEntityData.cs
@@ -3,9 +3,6 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.IO;
-using System.Threading.Tasks;
-using BTCPayServer.Abstractions;
-using Dapper;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
diff --git a/BTCPayServer.Data/Data/CustomerIdentityData.cs b/BTCPayServer.Data/Data/CustomerIdentityData.cs
index 890e8aa..5c6e822 100644
--- a/BTCPayServer.Data/Data/CustomerIdentityData.cs
+++ b/BTCPayServer.Data/Data/CustomerIdentityData.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using BTCPayServer.Data.Subscriptions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
diff --git a/BTCPayServer.Data/Data/Fido2Credential.cs b/BTCPayServer.Data/Data/Fido2Credential.cs
index 0869257..420c0f3 100644
--- a/BTCPayServer.Data/Data/Fido2Credential.cs
+++ b/BTCPayServer.Data/Data/Fido2Credential.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer.Data/Data/IHasBlob.cs b/BTCPayServer.Data/Data/IHasBlob.cs
index fdff25e..bc4c8d6 100644
--- a/BTCPayServer.Data/Data/IHasBlob.cs
+++ b/BTCPayServer.Data/Data/IHasBlob.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/InvoiceData.Migration.cs b/BTCPayServer.Data/Data/InvoiceData.Migration.cs
index 843f712..1330e50 100644
--- a/BTCPayServer.Data/Data/InvoiceData.Migration.cs
+++ b/BTCPayServer.Data/Data/InvoiceData.Migration.cs
@@ -1,22 +1,11 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.IO.Compression;
-using System.IO;
-using System.Text;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
using Newtonsoft.Json.Linq;
using System.Linq;
using System.Globalization;
using Newtonsoft.Json;
-using Microsoft.EntityFrameworkCore.Diagnostics;
-using BTCPayServer.Migrations;
using Newtonsoft.Json.Serialization;
-using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
-using System.Threading.Tasks;
-using System.Threading;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/InvoiceData.cs b/BTCPayServer.Data/Data/InvoiceData.cs
index c606a20..4cab8f9 100644
--- a/BTCPayServer.Data/Data/InvoiceData.cs
+++ b/BTCPayServer.Data/Data/InvoiceData.cs
@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Data
diff --git a/BTCPayServer.Data/Data/InvoiceEventData.cs b/BTCPayServer.Data/Data/InvoiceEventData.cs
index de7d403..f6c887d 100644
--- a/BTCPayServer.Data/Data/InvoiceEventData.cs
+++ b/BTCPayServer.Data/Data/InvoiceEventData.cs
@@ -1,5 +1,4 @@
using System;
-using Microsoft.EntityFrameworkCore;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/MigrationExtensions.cs b/BTCPayServer.Data/Data/MigrationExtensions.cs
index d67bbf4..08a3467 100644
--- a/BTCPayServer.Data/Data/MigrationExtensions.cs
+++ b/BTCPayServer.Data/Data/MigrationExtensions.cs
@@ -4,9 +4,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO.Compression;
using System.IO;
-using System.Linq;
using System.Text;
-using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
diff --git a/BTCPayServer.Data/Data/MigrationInterceptor.cs b/BTCPayServer.Data/Data/MigrationInterceptor.cs
index e95f4a4..8bd85f7 100644
--- a/BTCPayServer.Data/Data/MigrationInterceptor.cs
+++ b/BTCPayServer.Data/Data/MigrationInterceptor.cs
@@ -1,7 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Diagnostics;
diff --git a/BTCPayServer.Data/Data/PaymentData.Migration.cs b/BTCPayServer.Data/Data/PaymentData.Migration.cs
index 3250564..57bf0ab 100644
--- a/BTCPayServer.Data/Data/PaymentData.Migration.cs
+++ b/BTCPayServer.Data/Data/PaymentData.Migration.cs
@@ -1,13 +1,7 @@
using System;
-using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
-using System.Reflection.Metadata;
-using System.Text;
-using System.Threading.Tasks;
-using BTCPayServer.Migrations;
-using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using NBitcoin;
using NBitcoin.Altcoins;
using NBitcoin.DataEncoders;
diff --git a/BTCPayServer.Data/Data/PaymentData.cs b/BTCPayServer.Data/Data/PaymentData.cs
index 76f2c52..32e6fce 100644
--- a/BTCPayServer.Data/Data/PaymentData.cs
+++ b/BTCPayServer.Data/Data/PaymentData.cs
@@ -1,7 +1,5 @@
using System;
-using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/PaymentRequestData.Migration.cs b/BTCPayServer.Data/Data/PaymentRequestData.Migration.cs
index 03be676..a83594b 100644
--- a/BTCPayServer.Data/Data/PaymentRequestData.Migration.cs
+++ b/BTCPayServer.Data/Data/PaymentRequestData.Migration.cs
@@ -1,11 +1,6 @@
using System;
-using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Globalization;
-using System.Linq;
-using System.Reflection.Metadata;
-using System.Text;
-using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Data
diff --git a/BTCPayServer.Data/Data/PaymentRequestData.cs b/BTCPayServer.Data/Data/PaymentRequestData.cs
index d937bf3..44a1ed4 100644
--- a/BTCPayServer.Data/Data/PaymentRequestData.cs
+++ b/BTCPayServer.Data/Data/PaymentRequestData.cs
@@ -1,5 +1,4 @@
using System;
-using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BTCPayServer.Client.Models;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer.Data/Data/PayoutData.cs b/BTCPayServer.Data/Data/PayoutData.cs
index 9d3421f..39d9f60 100644
--- a/BTCPayServer.Data/Data/PayoutData.cs
+++ b/BTCPayServer.Data/Data/PayoutData.cs
@@ -1,10 +1,8 @@
using System;
using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
using BTCPayServer.Client.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using NBitcoin;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/PendingTransaction.cs b/BTCPayServer.Data/Data/PendingTransaction.cs
index ef1e3e8..4cdf8c5 100644
--- a/BTCPayServer.Data/Data/PendingTransaction.cs
+++ b/BTCPayServer.Data/Data/PendingTransaction.cs
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Text.Json.Serialization;
-using BTCPayServer.Abstractions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Newtonsoft.Json;
namespace BTCPayServer.Data;
diff --git a/BTCPayServer.Data/Data/PullPaymentData.cs b/BTCPayServer.Data/Data/PullPaymentData.cs
index 7be77d3..e006f3f 100644
--- a/BTCPayServer.Data/Data/PullPaymentData.cs
+++ b/BTCPayServer.Data/Data/PullPaymentData.cs
@@ -2,15 +2,9 @@ using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using NBitcoin;
-using static System.Runtime.InteropServices.JavaScript.JSType;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/RefundData.cs b/BTCPayServer.Data/Data/RefundData.cs
index 8aa6c40..dafbe5b 100644
--- a/BTCPayServer.Data/Data/RefundData.cs
+++ b/BTCPayServer.Data/Data/RefundData.cs
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Internal;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/StoreData.cs b/BTCPayServer.Data/Data/StoreData.cs
index ad46b8f..d0613d5 100644
--- a/BTCPayServer.Data/Data/StoreData.cs
+++ b/BTCPayServer.Data/Data/StoreData.cs
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
-using System.Text;
using BTCPayServer.Client.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/StoreRole.cs b/BTCPayServer.Data/Data/StoreRole.cs
index b872300..83d4f52 100644
--- a/BTCPayServer.Data/Data/StoreRole.cs
+++ b/BTCPayServer.Data/Data/StoreRole.cs
@@ -1,12 +1,6 @@
-
-using System;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Infrastructure;
-using Newtonsoft.Json;
namespace BTCPayServer.Data;
diff --git a/BTCPayServer.Data/Data/Subscriptions/PortalSessionData.cs b/BTCPayServer.Data/Data/Subscriptions/PortalSessionData.cs
index 8f5f0f5..4d698bb 100644
--- a/BTCPayServer.Data/Data/Subscriptions/PortalSessionData.cs
+++ b/BTCPayServer.Data/Data/Subscriptions/PortalSessionData.cs
@@ -2,7 +2,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BTCPayServer.Abstractions;
-using BTCPayServer.Data.Subscriptions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
diff --git a/BTCPayServer.Data/Data/WalletObjectLinkData.cs b/BTCPayServer.Data/Data/WalletObjectLinkData.cs
index 5c4dae1..a6cd94f 100644
--- a/BTCPayServer.Data/Data/WalletObjectLinkData.cs
+++ b/BTCPayServer.Data/Data/WalletObjectLinkData.cs
@@ -1,8 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
diff --git a/BTCPayServer.PluginPacker/Program.cs b/BTCPayServer.PluginPacker/Program.cs
index 1ab9c08..09519d5 100644
--- a/BTCPayServer.PluginPacker/Program.cs
+++ b/BTCPayServer.PluginPacker/Program.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
@@ -12,7 +11,6 @@ using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Plugins.Dotnet;
using NBitcoin.Crypto;
using NBitcoin.DataEncoders;
-using NBitcoin.Secp256k1;
namespace BTCPayServer.PluginPacker
{
diff --git a/BTCPayServer.Rating/CurrencyPair.cs b/BTCPayServer.Rating/CurrencyPair.cs
index 5951273..b8ab34a 100644
--- a/BTCPayServer.Rating/CurrencyPair.cs
+++ b/BTCPayServer.Rating/CurrencyPair.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using BTCPayServer.Services.Rates;
namespace BTCPayServer.Rating
diff --git a/BTCPayServer.Rating/Extensions.cs b/BTCPayServer.Rating/Extensions.cs
index 727b975..f3760b8 100644
--- a/BTCPayServer.Rating/Extensions.cs
+++ b/BTCPayServer.Rating/Extensions.cs
@@ -1,7 +1,5 @@
#nullable enable
using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
diff --git a/BTCPayServer.Rating/Providers/BTCTurkRateProvider.cs b/BTCPayServer.Rating/Providers/BTCTurkRateProvider.cs
index 308661c..b4d9b28 100644
--- a/BTCPayServer.Rating/Providers/BTCTurkRateProvider.cs
+++ b/BTCPayServer.Rating/Providers/BTCTurkRateProvider.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
diff --git a/BTCPayServer.Rating/Providers/CoinDCXRateProvider.cs b/BTCPayServer.Rating/Providers/CoinDCXRateProvider.cs
index 127db42..ee52082 100644
--- a/BTCPayServer.Rating/Providers/CoinDCXRateProvider.cs
+++ b/BTCPayServer.Rating/Providers/CoinDCXRateProvider.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
diff --git a/BTCPayServer.Rating/Providers/LunoRateProvider.cs b/BTCPayServer.Rating/Providers/LunoRateProvider.cs
index 7a3bbbd..55ee9d2 100644
--- a/BTCPayServer.Rating/Providers/LunoRateProvider.cs
+++ b/BTCPayServer.Rating/Providers/LunoRateProvider.cs
@@ -2,11 +2,9 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Net.Http;
-using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Rating.Providers;
diff --git a/BTCPayServer.Rating/Providers/RipioExchangeProvider.cs b/BTCPayServer.Rating/Providers/RipioExchangeProvider.cs
index f6db52a..5474c37 100644
--- a/BTCPayServer.Rating/Providers/RipioExchangeProvider.cs
+++ b/BTCPayServer.Rating/Providers/RipioExchangeProvider.cs
@@ -1,9 +1,6 @@
-using System;
-using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net.Http;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Rating;
diff --git a/BTCPayServer.Rating/Providers/YadioRateProvider.cs b/BTCPayServer.Rating/Providers/YadioRateProvider.cs
index 5f331cb..e73efa3 100644
--- a/BTCPayServer.Rating/Providers/YadioRateProvider.cs
+++ b/BTCPayServer.Rating/Providers/YadioRateProvider.cs
@@ -1,13 +1,8 @@
-using System;
using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
using System.Net.Http;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Rating;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Rates
diff --git a/BTCPayServer.Rating/RateRules.cs b/BTCPayServer.Rating/RateRules.cs
index 17abae4..4056e34 100644
--- a/BTCPayServer.Rating/RateRules.cs
+++ b/BTCPayServer.Rating/RateRules.cs
@@ -1,11 +1,9 @@
#nullable enable
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
-using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
diff --git a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs
index cafd27d..7f53ede 100644
--- a/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs
+++ b/BTCPayServer.Tests/AltcoinTests/AltcoinTests.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
-using System.Net.Http;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using BTCPayServer.Controllers;
diff --git a/BTCPayServer.Tests/AltcoinTests/ElementsTests.cs b/BTCPayServer.Tests/AltcoinTests/ElementsTests.cs
index 4e730aa..3fb54d5 100644
--- a/BTCPayServer.Tests/AltcoinTests/ElementsTests.cs
+++ b/BTCPayServer.Tests/AltcoinTests/ElementsTests.cs
@@ -1,16 +1,11 @@
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Configuration;
using BTCPayServer.Controllers;
using BTCPayServer.Models.WalletViewModels;
using BTCPayServer.Plugins.Altcoins;
using BTCPayServer.Services.Wallets;
-using BTCPayServer.Tests.Logging;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.Configuration.Memory;
using NBitcoin;
using NBitcoin.Payment;
using NBitpayClient;
diff --git a/BTCPayServer.Tests/CollectionDefinitions.cs b/BTCPayServer.Tests/CollectionDefinitions.cs
index 4eefb3e..a5a250c 100644
--- a/BTCPayServer.Tests/CollectionDefinitions.cs
+++ b/BTCPayServer.Tests/CollectionDefinitions.cs
@@ -1,7 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Xunit;
namespace BTCPayServer.Tests
diff --git a/BTCPayServer.Tests/DatabaseTester.cs b/BTCPayServer.Tests/DatabaseTester.cs
index 6f5605e..6cf09a7 100644
--- a/BTCPayServer.Tests/DatabaseTester.cs
+++ b/BTCPayServer.Tests/DatabaseTester.cs
@@ -1,6 +1,4 @@
using System;
-using System.Data;
-using System.Data.Common;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Models;
diff --git a/BTCPayServer.Tests/FactWithSecretAttribute.cs b/BTCPayServer.Tests/FactWithSecretAttribute.cs
index a51ad89..c76eb75 100644
--- a/BTCPayServer.Tests/FactWithSecretAttribute.cs
+++ b/BTCPayServer.Tests/FactWithSecretAttribute.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Xunit;
using Xunit.Sdk;
diff --git a/BTCPayServer.Tests/FastTests.cs b/BTCPayServer.Tests/FastTests.cs
index 8afe74c..0f7f4e5 100644
--- a/BTCPayServer.Tests/FastTests.cs
+++ b/BTCPayServer.Tests/FastTests.cs
@@ -14,20 +14,17 @@ using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client;
using BTCPayServer.Client.Models;
using BTCPayServer.Configuration;
-using BTCPayServer.Controllers;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
using BTCPayServer.Hosting;
using BTCPayServer.JsonConverters;
using BTCPayServer.Payments;
-using BTCPayServer.Plugins.Emails.Views;
using BTCPayServer.Rating;
using BTCPayServer.Services;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Fees;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
-using BTCPayServer.Services.Stores;
using BTCPayServer.Services.Wallets;
using BTCPayServer.Validation;
using Microsoft.Extensions.Configuration;
@@ -37,7 +34,6 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using NBitcoin;
using NBitcoin.RPC;
-using NBitcoin.Scripting.Parser;
using NBitcoin.WalletPolicies;
using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
diff --git a/BTCPayServer.Tests/GreenfieldAPITests.cs b/BTCPayServer.Tests/GreenfieldAPITests.cs
index fb0f6ae..b24a5b3 100644
--- a/BTCPayServer.Tests/GreenfieldAPITests.cs
+++ b/BTCPayServer.Tests/GreenfieldAPITests.cs
@@ -25,7 +25,6 @@ using BTCPayServer.Services.Notifications;
using BTCPayServer.Services.Notifications.Blobs;
using BTCPayServer.Services.Stores;
using Dapper;
-using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
diff --git a/BTCPayServer.Tests/LanguageServiceTests.cs b/BTCPayServer.Tests/LanguageServiceTests.cs
index ac2e5bf..25ce23e 100644
--- a/BTCPayServer.Tests/LanguageServiceTests.cs
+++ b/BTCPayServer.Tests/LanguageServiceTests.cs
@@ -3,7 +3,6 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using BTCPayServer.Hosting;
using BTCPayServer.Plugins.Translations;
using BTCPayServer.Services;
using Dapper;
diff --git a/BTCPayServer.Tests/MonetizationTests.cs b/BTCPayServer.Tests/MonetizationTests.cs
index d2a37ea..8b301b1 100644
--- a/BTCPayServer.Tests/MonetizationTests.cs
+++ b/BTCPayServer.Tests/MonetizationTests.cs
@@ -5,7 +5,6 @@ using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Plugins.Monetization;
using BTCPayServer.Services;
-using BTCPayServer.Views.Manage;
using BTCPayServer.Views.Server;
using Microsoft.Playwright;
using Xunit;
diff --git a/BTCPayServer.Tests/MultisigTests.cs b/BTCPayServer.Tests/MultisigTests.cs
index f12b598..7fbbf02 100644
--- a/BTCPayServer.Tests/MultisigTests.cs
+++ b/BTCPayServer.Tests/MultisigTests.cs
@@ -1,14 +1,6 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text.RegularExpressions;
-using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Models;
-using BTCPayServer.BIP78.Sender;
using BTCPayServer.Controllers;
-using BTCPayServer.Events;
-using BTCPayServer.Services.Invoices;
using BTCPayServer.Views.Wallets;
using NBitcoin;
using NBXplorer.DerivationStrategy;
diff --git a/BTCPayServer.Tests/PMO/ConfigureEmailPMO.cs b/BTCPayServer.Tests/PMO/ConfigureEmailPMO.cs
index 19dd18c..f2014f8 100644
--- a/BTCPayServer.Tests/PMO/ConfigureEmailPMO.cs
+++ b/BTCPayServer.Tests/PMO/ConfigureEmailPMO.cs
@@ -1,6 +1,5 @@
#nullable enable
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Models;
namespace BTCPayServer.Tests.PMO;
diff --git a/BTCPayServer.Tests/POSTests.cs b/BTCPayServer.Tests/POSTests.cs
index a0cfb54..ea88fbb 100644
--- a/BTCPayServer.Tests/POSTests.cs
+++ b/BTCPayServer.Tests/POSTests.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
diff --git a/BTCPayServer.Tests/PSBTTests.cs b/BTCPayServer.Tests/PSBTTests.cs
index 48512f5..e1052dd 100644
--- a/BTCPayServer.Tests/PSBTTests.cs
+++ b/BTCPayServer.Tests/PSBTTests.cs
@@ -1,15 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Controllers;
-using BTCPayServer.Models;
-using BTCPayServer.Models.WalletViewModels;
-using BTCPayServer.Tests.Logging;
-using Microsoft.AspNetCore.Mvc;
using NBitcoin;
-using NBitpayClient;
using Xunit;
using Xunit.Abstractions;
diff --git a/BTCPayServer.Tests/PayJoinTests.cs b/BTCPayServer.Tests/PayJoinTests.cs
index a13136f..43fb1af 100644
--- a/BTCPayServer.Tests/PayJoinTests.cs
+++ b/BTCPayServer.Tests/PayJoinTests.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Net.Http;
using System.Text;
@@ -12,7 +11,6 @@ using BTCPayServer.Controllers;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Payments;
-using Microsoft.Playwright;
using static Microsoft.Playwright.Assertions;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Payments.PayJoin;
@@ -20,8 +18,6 @@ using BTCPayServer.Payments.PayJoin.Sender;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Wallets;
-using BTCPayServer.Tests.Logging;
-using BTCPayServer.Views.Stores;
using BTCPayServer.Views.Wallets;
using Microsoft.AspNetCore.Http;
using NBitcoin;
diff --git a/BTCPayServer.Tests/PaymentRequestTests.cs b/BTCPayServer.Tests/PaymentRequestTests.cs
index 6e3cb25..b25c497 100644
--- a/BTCPayServer.Tests/PaymentRequestTests.cs
+++ b/BTCPayServer.Tests/PaymentRequestTests.cs
@@ -4,9 +4,7 @@ using System.Threading.Tasks;
using BTCPayServer.Controllers;
using BTCPayServer.Data;
using BTCPayServer.Models.PaymentRequestViewModels;
-using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.PaymentRequests;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NBitpayClient;
using Xunit;
diff --git a/BTCPayServer.Tests/PullPaymentsTests.cs b/BTCPayServer.Tests/PullPaymentsTests.cs
index b969687..38ca3a4 100644
--- a/BTCPayServer.Tests/PullPaymentsTests.cs
+++ b/BTCPayServer.Tests/PullPaymentsTests.cs
@@ -17,7 +17,6 @@ using BTCPayServer.Views.Stores;
using Dapper;
using LNURL;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Playwright;
using NBitcoin;
using NBitcoin.DataEncoders;
using Xunit;
diff --git a/BTCPayServer.Tests/TestAccount.cs b/BTCPayServer.Tests/TestAccount.cs
index 749fdeb..42c8db2 100644
--- a/BTCPayServer.Tests/TestAccount.cs
+++ b/BTCPayServer.Tests/TestAccount.cs
@@ -7,7 +7,6 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.BIP78.Sender;
using BTCPayServer.Client;
using BTCPayServer.Client.Models;
diff --git a/BTCPayServer.Tests/ThirdPartyTests.cs b/BTCPayServer.Tests/ThirdPartyTests.cs
index 51d51bb..4dbc838 100644
--- a/BTCPayServer.Tests/ThirdPartyTests.cs
+++ b/BTCPayServer.Tests/ThirdPartyTests.cs
@@ -9,7 +9,6 @@ using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Controllers;
using BTCPayServer.Data;
-using BTCPayServer.HostedServices;
using BTCPayServer.Hosting;
using BTCPayServer.Models.StoreViewModels;
using BTCPayServer.Models.WalletViewModels;
@@ -20,16 +19,13 @@ using BTCPayServer.Storage.Models;
using BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.FileSystemGlobbing;
using NBitcoin;
using NBitpayClient;
using Newtonsoft.Json;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
-using static BTCPayServer.HostedServices.PullPaymentHostedService.PayoutApproval;
namespace BTCPayServer.Tests
{
diff --git a/BTCPayServer.Tests/UnitTestBase.cs b/BTCPayServer.Tests/UnitTestBase.cs
index 6edc0eb..9356ac1 100644
--- a/BTCPayServer.Tests/UnitTestBase.cs
+++ b/BTCPayServer.Tests/UnitTestBase.cs
@@ -1,8 +1,5 @@
-using System;
using System.Collections.Generic;
-using System.Linq;
using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Hosting;
using BTCPayServer.Logging;
diff --git a/BTCPayServer.Tests/UtilitiesTests.cs b/BTCPayServer.Tests/UtilitiesTests.cs
index 88e6f3c..027dc9a 100644
--- a/BTCPayServer.Tests/UtilitiesTests.cs
+++ b/BTCPayServer.Tests/UtilitiesTests.cs
@@ -1,19 +1,12 @@
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.RegularExpressions;
-using System.Threading;
using System.Threading.Tasks;
-using Amazon.Auth.AccessControlPolicy;
-using Amazon.Runtime.Internal;
using BTCPayServer.Client;
-using BTCPayServer.Client.Models;
-using BTCPayServer.Controllers;
using BTCPayServer.Plugins.Translations;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Razor.Language;
diff --git a/BTCPayServer.Tests/Utils.cs b/BTCPayServer.Tests/Utils.cs
index 7adf810..37792e4 100644
--- a/BTCPayServer.Tests/Utils.cs
+++ b/BTCPayServer.Tests/Utils.cs
@@ -1,6 +1,5 @@
using System;
using System.IO;
-using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Threading;
diff --git a/BTCPayServer/APDUVaultTransport.cs b/BTCPayServer/APDUVaultTransport.cs
index 1f3722a..2d93673 100644
--- a/BTCPayServer/APDUVaultTransport.cs
+++ b/BTCPayServer/APDUVaultTransport.cs
@@ -1,11 +1,8 @@
using Newtonsoft.Json.Linq;
-using System.Net.WebSockets;
using System.Threading.Tasks;
using System.Threading;
using BTCPayServer.NTag424;
using NBitcoin.DataEncoders;
-using System;
-using SocketIOClient;
namespace BTCPayServer
{
diff --git a/BTCPayServer/Components/AppSales/Default.cshtml b/BTCPayServer/Components/AppSales/Default.cshtml
index 2d5b3db..fc570ed 100644
--- a/BTCPayServer/Components/AppSales/Default.cshtml
+++ b/BTCPayServer/Components/AppSales/Default.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Components.AppSales
-@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Plugins.Crowdfund
@model BTCPayServer.Components.AppSales.AppSalesViewModel
diff --git a/BTCPayServer/Components/AppTopItems/AppTopItems.cs b/BTCPayServer/Components/AppTopItems/AppTopItems.cs
index e085f90..6c17b06 100644
--- a/BTCPayServer/Components/AppTopItems/AppTopItems.cs
+++ b/BTCPayServer/Components/AppTopItems/AppTopItems.cs
@@ -1,11 +1,6 @@
-using System;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Components.AppSales;
-using BTCPayServer.Data;
using BTCPayServer.Services.Apps;
-using BTCPayServer.Services.Stores;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewComponents;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
diff --git a/BTCPayServer/Components/AppTopItems/AppTopItemsViewModel.cs b/BTCPayServer/Components/AppTopItems/AppTopItemsViewModel.cs
index 1d9335d..54c77bf 100644
--- a/BTCPayServer/Components/AppTopItems/AppTopItemsViewModel.cs
+++ b/BTCPayServer/Components/AppTopItems/AppTopItemsViewModel.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using BTCPayServer.Client.Models;
-using BTCPayServer.Services.Apps;
namespace BTCPayServer.Components.AppTopItems;
diff --git a/BTCPayServer/Components/LabelManager/LabelManager.cs b/BTCPayServer/Components/LabelManager/LabelManager.cs
index 663a35c..0119917 100644
--- a/BTCPayServer/Components/LabelManager/LabelManager.cs
+++ b/BTCPayServer/Components/LabelManager/LabelManager.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Components/Pager/Default.cshtml b/BTCPayServer/Components/Pager/Default.cshtml
index 571e5c6..e88448f 100644
--- a/BTCPayServer/Components/Pager/Default.cshtml
+++ b/BTCPayServer/Components/Pager/Default.cshtml
@@ -1,5 +1,4 @@
@using System.Web
-@using BTCPayServer.TagHelpers
@model BasePagingViewModel
@{
diff --git a/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml b/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml
index 63d3f2d..ce5f7d2 100644
--- a/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml
+++ b/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Client.Models
@using BTCPayServer.Services
@inject DisplayFormatter DisplayFormatter
@model BTCPayServer.Components.StoreRecentInvoices.StoreRecentInvoicesViewModel
diff --git a/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoices.cs b/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoices.cs
index 65704ea..60a89ec 100644
--- a/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoices.cs
+++ b/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoices.cs
@@ -3,9 +3,6 @@ using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Services.Invoices;
-using BTCPayServer.Services.Rates;
-using BTCPayServer.Services.Stores;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Components.StoreRecentInvoices;
diff --git a/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoicesViewModel.cs b/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoicesViewModel.cs
index b129bfb..ee1a3af 100644
--- a/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoicesViewModel.cs
+++ b/BTCPayServer/Components/StoreRecentInvoices/StoreRecentInvoicesViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using BTCPayServer.Data;
namespace BTCPayServer.Components.StoreRecentInvoices;
diff --git a/BTCPayServer/Components/StoreSelector/Default.cshtml b/BTCPayServer/Components/StoreSelector/Default.cshtml
index 8939808..84610bf 100644
--- a/BTCPayServer/Components/StoreSelector/Default.cshtml
+++ b/BTCPayServer/Components/StoreSelector/Default.cshtml
@@ -1,7 +1,4 @@
-@using BTCPayServer.Components.MainLogo
@using BTCPayServer.Services
-@using BTCPayServer.Views.Server
-@using BTCPayServer.Views.Stores
@inject BTCPayServerEnvironment Env
@model BTCPayServer.Components.StoreSelector.StoreSelectorViewModel
@functions {
diff --git a/BTCPayServer/Components/StoreWalletBalance/Default.cshtml b/BTCPayServer/Components/StoreWalletBalance/Default.cshtml
index 2d8468b..a515f6f 100644
--- a/BTCPayServer/Components/StoreWalletBalance/Default.cshtml
+++ b/BTCPayServer/Components/StoreWalletBalance/Default.cshtml
@@ -1,6 +1,4 @@
-@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Client.Models
-@using BTCPayServer.TagHelpers
@model BTCPayServer.Components.StoreWalletBalance.StoreWalletBalanceViewModel
<div id="StoreWalletBalance-@Model.StoreId-@Model.CryptoCode" class="widget store-wallet-balance">
<div class="d-flex gap-3 align-items-center justify-content-between mb-2">
diff --git a/BTCPayServer/Components/UiExtensionPoint/UIExtensionPoint.cs b/BTCPayServer/Components/UiExtensionPoint/UIExtensionPoint.cs
index e75b7fc..3efa11e 100644
--- a/BTCPayServer/Components/UiExtensionPoint/UIExtensionPoint.cs
+++ b/BTCPayServer/Components/UiExtensionPoint/UIExtensionPoint.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
using System.Linq;
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Configuration/BTCPayServerOptions.cs b/BTCPayServer/Configuration/BTCPayServerOptions.cs
index af50f4b..580b0bc 100644
--- a/BTCPayServer/Configuration/BTCPayServerOptions.cs
+++ b/BTCPayServer/Configuration/BTCPayServerOptions.cs
@@ -2,7 +2,6 @@ using System;
using System.IO;
using System.Linq;
using System.Net;
-using BTCPayServer.Configuration;
using BTCPayServer.Logging;
using BTCPayServer.SSH;
using Microsoft.Extensions.Configuration;
diff --git a/BTCPayServer/Configuration/ConfigurationExtensions.cs b/BTCPayServer/Configuration/ConfigurationExtensions.cs
index 16c699a..f6e612b 100644
--- a/BTCPayServer/Configuration/ConfigurationExtensions.cs
+++ b/BTCPayServer/Configuration/ConfigurationExtensions.cs
@@ -3,7 +3,6 @@ using System.Globalization;
using System.Linq;
using System.Net;
using Microsoft.Extensions.Configuration;
-using NBitcoin;
namespace BTCPayServer.Configuration
{
diff --git a/BTCPayServer/Configuration/DefaultConfiguration.cs b/BTCPayServer/Configuration/DefaultConfiguration.cs
index 7b4682d..7de4339 100644
--- a/BTCPayServer/Configuration/DefaultConfiguration.cs
+++ b/BTCPayServer/Configuration/DefaultConfiguration.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
@@ -11,7 +10,6 @@ using BTCPayServer.Plugins;
using BTCPayServer.Plugins.Bitcoin;
using CommandLine;
using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.Configuration.Memory;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
using NBXplorer;
diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
index fd6ba8b..4fc4044 100644
--- a/BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
+++ b/BTCPayServer/Controllers/GreenField/GreenfieldInvoiceController.cs
@@ -1,7 +1,6 @@
#nullable enable
using System;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -154,9 +153,9 @@ namespace BTCPayServer.Controllers.Greenfield
[HttpPut("~/api/v1/stores/{storeId}/invoices/{invoiceId}")]
public async Task<IActionResult> UpdateInvoice(string storeId, string invoiceId, UpdateInvoiceRequest request)
{
- var invoice = HttpContext.GetInvoiceData();
- if (invoice is null)
+ if (HttpContext.GetInvoiceData() is null)
return InvoiceNotFound();
+ var invoice = await _invoiceRepository.UpdateInvoiceMetadata(invoiceId, storeId, request.Metadata);
return Ok(ToModel(invoice));
}
diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
index bc704d5..6cf6973 100644
--- a/BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
+++ b/BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs
@@ -14,7 +14,6 @@ using BTCPayServer.Services.PaymentRequests;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using PaymentRequestData = BTCPayServer.Data.PaymentRequestData;
diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
index 409ab9e..272f511 100644
--- a/BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
+++ b/BTCPayServer/Controllers/GreenField/GreenfieldStoreLightningAddressesController.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
@@ -9,8 +8,6 @@ using BTCPayServer.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
using AuthenticationSchemes = BTCPayServer.Abstractions.Constants.AuthenticationSchemes;
using LightningAddressData = BTCPayServer.Client.Models.LightningAddressData;
diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.cs
index 5fb52a4..6e58497 100644
--- a/BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.cs
+++ b/BTCPayServer/Controllers/GreenField/GreenfieldStoreOnChainPaymentMethodsController.cs
@@ -16,7 +16,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
-using NBXplorer;
using NBXplorer.DerivationStrategy;
using Newtonsoft.Json.Linq;
using StoreData = BTCPayServer.Data.StoreData;
diff --git a/BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs b/BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs
index e29c1a4..9588936 100644
--- a/BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs
+++ b/BTCPayServer/Controllers/GreenField/GreenfieldStoreUsersController.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
diff --git a/BTCPayServer/Controllers/LnurlAuthService.cs b/BTCPayServer/Controllers/LnurlAuthService.cs
index ed25ada..37c0a06 100644
--- a/BTCPayServer/Controllers/LnurlAuthService.cs
+++ b/BTCPayServer/Controllers/LnurlAuthService.cs
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using BTCPayServer.Fido2;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using NBitcoin;
diff --git a/BTCPayServer/Controllers/UIAccountController.cs b/BTCPayServer/Controllers/UIAccountController.cs
index 1c06562..86ccaba 100644
--- a/BTCPayServer/Controllers/UIAccountController.cs
+++ b/BTCPayServer/Controllers/UIAccountController.cs
@@ -2,12 +2,10 @@ using System;
using System.Globalization;
using System.Linq;
using System.Net.Http;
-using System.Security.Claims;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Client;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Fido2;
diff --git a/BTCPayServer/Controllers/UIInvoiceController.Testing.cs b/BTCPayServer/Controllers/UIInvoiceController.Testing.cs
index f52d7bc..bbf4776 100644
--- a/BTCPayServer/Controllers/UIInvoiceController.Testing.cs
+++ b/BTCPayServer/Controllers/UIInvoiceController.Testing.cs
@@ -1,17 +1,11 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Filters;
-using BTCPayServer.Lightning;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
-using BTCPayServer.Payments.Lightning;
-using BTCPayServer.Services;
-using BTCPayServer.Services.Invoices;
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
diff --git a/BTCPayServer/Controllers/UIInvoiceController.cs b/BTCPayServer/Controllers/UIInvoiceController.cs
index f5c33b3..5525d2d 100644
--- a/BTCPayServer/Controllers/UIInvoiceController.cs
+++ b/BTCPayServer/Controllers/UIInvoiceController.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client.Models;
using BTCPayServer.Services;
diff --git a/BTCPayServer/Controllers/UILNURLAuthController.cs b/BTCPayServer/Controllers/UILNURLAuthController.cs
index a6eba26..c9891ab 100644
--- a/BTCPayServer/Controllers/UILNURLAuthController.cs
+++ b/BTCPayServer/Controllers/UILNURLAuthController.cs
@@ -4,10 +4,8 @@ using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
-using BTCPayServer.Data;
using LNURL;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Localization;
diff --git a/BTCPayServer/Controllers/UIManageController.2FA.cs b/BTCPayServer/Controllers/UIManageController.2FA.cs
index fc59e0a..af0b8e8 100644
--- a/BTCPayServer/Controllers/UIManageController.2FA.cs
+++ b/BTCPayServer/Controllers/UIManageController.2FA.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using BTCPayServer.Models;
using BTCPayServer.Models.ManageViewModels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
diff --git a/BTCPayServer/Controllers/UIManageController.cs b/BTCPayServer/Controllers/UIManageController.cs
index 26f93ad..6c0b255 100644
--- a/BTCPayServer/Controllers/UIManageController.cs
+++ b/BTCPayServer/Controllers/UIManageController.cs
@@ -11,7 +11,6 @@ using BTCPayServer.Fido2;
using BTCPayServer.Models.ManageViewModels;
using BTCPayServer.Security.Greenfield;
using BTCPayServer.Services;
-using BTCPayServer.Plugins.Emails.Services;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
diff --git a/BTCPayServer/Controllers/UINotificationsController.cs b/BTCPayServer/Controllers/UINotificationsController.cs
index 35e75b8..5d03158 100644
--- a/BTCPayServer/Controllers/UINotificationsController.cs
+++ b/BTCPayServer/Controllers/UINotificationsController.cs
@@ -3,12 +3,10 @@ using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Client;
-using BTCPayServer.Data;
using BTCPayServer.Models.NotificationViewModels;
using BTCPayServer.Services.Notifications;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers
diff --git a/BTCPayServer/Controllers/UIPaymentRequestController.cs b/BTCPayServer/Controllers/UIPaymentRequestController.cs
index d7392e4..6f9ff05 100644
--- a/BTCPayServer/Controllers/UIPaymentRequestController.cs
+++ b/BTCPayServer/Controllers/UIPaymentRequestController.cs
@@ -24,7 +24,6 @@ using BTCPayServer.Services.PaymentRequests;
using BTCPayServer.Services.Rates;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer/Controllers/UIServerController.cs b/BTCPayServer/Controllers/UIServerController.cs
index 1de4ac2..47d9052 100644
--- a/BTCPayServer/Controllers/UIServerController.cs
+++ b/BTCPayServer/Controllers/UIServerController.cs
@@ -32,12 +32,10 @@ using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-using MimeKit;
using NBitcoin;
using NBitcoin.DataEncoders;
using Renci.SshNet;
diff --git a/BTCPayServer/Controllers/UIStoresController.Onchain.cs b/BTCPayServer/Controllers/UIStoresController.Onchain.cs
index 9ea7ed2..82ada50 100644
--- a/BTCPayServer/Controllers/UIStoresController.Onchain.cs
+++ b/BTCPayServer/Controllers/UIStoresController.Onchain.cs
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Linq;
-using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
@@ -21,7 +20,6 @@ using Microsoft.AspNetCore.Mvc;
using NBitcoin;
using NBitcoin.DataEncoders;
using NBXplorer;
-using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Controllers/UIStoresController.Rates.cs b/BTCPayServer/Controllers/UIStoresController.Rates.cs
index e510fa1..805ed3b 100644
--- a/BTCPayServer/Controllers/UIStoresController.Rates.cs
+++ b/BTCPayServer/Controllers/UIStoresController.Rates.cs
@@ -6,8 +6,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
-using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
using BTCPayServer.Data;
using BTCPayServer.Models.StoreViewModels;
diff --git a/BTCPayServer/Controllers/UIStoresController.cs b/BTCPayServer/Controllers/UIStoresController.cs
index c5e8d21..cccc5ea 100644
--- a/BTCPayServer/Controllers/UIStoresController.cs
+++ b/BTCPayServer/Controllers/UIStoresController.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
diff --git a/BTCPayServer/Controllers/UIWalletsController.cs b/BTCPayServer/Controllers/UIWalletsController.cs
index 67d2af6..adf3eed 100644
--- a/BTCPayServer/Controllers/UIWalletsController.cs
+++ b/BTCPayServer/Controllers/UIWalletsController.cs
@@ -33,7 +33,6 @@ using BTCPayServer.Services.Wallets.Export;
using Dapper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.DependencyInjection;
diff --git a/BTCPayServer/CurrencyValue.cs b/BTCPayServer/CurrencyValue.cs
index c7c197c..c70df03 100644
--- a/BTCPayServer/CurrencyValue.cs
+++ b/BTCPayServer/CurrencyValue.cs
@@ -1,7 +1,6 @@
using System;
using System.Globalization;
using System.Text.RegularExpressions;
-using BTCPayServer.Services.Rates;
namespace BTCPayServer
{
diff --git a/BTCPayServer/Data/BoltcardDataExtensions.cs b/BTCPayServer/Data/BoltcardDataExtensions.cs
index 56b8f66..f82a21a 100644
--- a/BTCPayServer/Data/BoltcardDataExtensions.cs
+++ b/BTCPayServer/Data/BoltcardDataExtensions.cs
@@ -6,7 +6,6 @@ using Dapper;
using Microsoft.EntityFrameworkCore;
using NBitcoin.DataEncoders;
using System;
-using System.Linq;
using System.Threading.Tasks;
namespace BTCPayServer;
diff --git a/BTCPayServer/Data/IHasBlobExtensions.cs b/BTCPayServer/Data/IHasBlobExtensions.cs
index 48d84e9..71aeab5 100644
--- a/BTCPayServer/Data/IHasBlobExtensions.cs
+++ b/BTCPayServer/Data/IHasBlobExtensions.cs
@@ -1,10 +1,6 @@
#nullable enable
using System;
-using System.Collections;
-using System.Linq;
-using System.Reflection.Metadata;
using System.Text;
-using NBXplorer;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Data/InvoiceDataExtensions.cs b/BTCPayServer/Data/InvoiceDataExtensions.cs
index 7475a14..a64de00 100644
--- a/BTCPayServer/Data/InvoiceDataExtensions.cs
+++ b/BTCPayServer/Data/InvoiceDataExtensions.cs
@@ -1,14 +1,9 @@
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
-using System.Reflection.Metadata;
using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using BTCPayServer.Services.Invoices;
-using NBitpayClient;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Serialization;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer/Data/PaymentDataExtensions.cs b/BTCPayServer/Data/PaymentDataExtensions.cs
index 11ca103..ee64abe 100644
--- a/BTCPayServer/Data/PaymentDataExtensions.cs
+++ b/BTCPayServer/Data/PaymentDataExtensions.cs
@@ -1,10 +1,7 @@
#nullable enable
using System;
-using System.Reflection.Metadata;
-using System.Runtime.InteropServices;
using BTCPayServer.Payments;
using BTCPayServer.Services.Invoices;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Data
diff --git a/BTCPayServer/Data/PaymentRequestBlob.cs b/BTCPayServer/Data/PaymentRequestBlob.cs
index 47b1c1d..29b26b7 100644
--- a/BTCPayServer/Data/PaymentRequestBlob.cs
+++ b/BTCPayServer/Data/PaymentRequestBlob.cs
@@ -1,7 +1,4 @@
-using BTCPayServer.JsonConverters;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using System.Collections.Generic;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer/Data/PaymentRequestDataExtensions.cs b/BTCPayServer/Data/PaymentRequestDataExtensions.cs
index 65c7c1f..c8c3558 100644
--- a/BTCPayServer/Data/PaymentRequestDataExtensions.cs
+++ b/BTCPayServer/Data/PaymentRequestDataExtensions.cs
@@ -1,8 +1,4 @@
-using System;
-using BTCPayServer.Client.Models;
-using NBXplorer;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs b/BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs
index 84940a8..6f7c7a0 100644
--- a/BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs
+++ b/BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer;
@@ -24,7 +23,6 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using NBitcoin;
using NBitcoin.Payment;
-using NBitcoin.RPC;
using NBXplorer.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Data/Payouts/IPayoutHandler.cs b/BTCPayServer/Data/Payouts/IPayoutHandler.cs
index aba916d..1f161f7 100644
--- a/BTCPayServer/Data/Payouts/IPayoutHandler.cs
+++ b/BTCPayServer/Data/Payouts/IPayoutHandler.cs
@@ -8,7 +8,6 @@ using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Microsoft.AspNetCore.Mvc;
using PayoutData = BTCPayServer.Data.PayoutData;
diff --git a/BTCPayServer/Data/Payouts/PayoutBlob.cs b/BTCPayServer/Data/Payouts/PayoutBlob.cs
index 1ae46cb..0f7f2a3 100644
--- a/BTCPayServer/Data/Payouts/PayoutBlob.cs
+++ b/BTCPayServer/Data/Payouts/PayoutBlob.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Data/Payouts/PayoutExtensions.cs b/BTCPayServer/Data/Payouts/PayoutExtensions.cs
index 75ba506..33ecb4a 100644
--- a/BTCPayServer/Data/Payouts/PayoutExtensions.cs
+++ b/BTCPayServer/Data/Payouts/PayoutExtensions.cs
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Threading.Tasks;
-using BTCPayServer.Client.Models;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using BTCPayServer.Services;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer/Data/PullPayments/PullPaymentBlob.cs b/BTCPayServer/Data/PullPayments/PullPaymentBlob.cs
index fb41de0..ff7064d 100644
--- a/BTCPayServer/Data/PullPayments/PullPaymentBlob.cs
+++ b/BTCPayServer/Data/PullPayments/PullPaymentBlob.cs
@@ -2,7 +2,6 @@ using System;
using System.ComponentModel;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.JsonConverters;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Data/PullPayments/PullPaymentsExtensions.cs b/BTCPayServer/Data/PullPayments/PullPaymentsExtensions.cs
index 86d59fc..14c48df 100644
--- a/BTCPayServer/Data/PullPayments/PullPaymentsExtensions.cs
+++ b/BTCPayServer/Data/PullPayments/PullPaymentsExtensions.cs
@@ -1,7 +1,5 @@
using System.Linq;
-using System.Text;
using BTCPayServer.Payouts;
-using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Data
diff --git a/BTCPayServer/Data/StoreDataExtensions.cs b/BTCPayServer/Data/StoreDataExtensions.cs
index 756bd90..48a12bb 100644
--- a/BTCPayServer/Data/StoreDataExtensions.cs
+++ b/BTCPayServer/Data/StoreDataExtensions.cs
@@ -1,16 +1,10 @@
#nullable enable
using System;
using System.Collections.Generic;
-using System.Data;
using System.Linq;
-using System.Text;
-using BTCPayServer.Client;
-using BTCPayServer.Client.Models;
using BTCPayServer.Payments;
using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services.Invoices;
-using BTCPayServer.Services.Rates;
-using NBitcoin;
using NBXplorer;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/DefaultRules.cs b/BTCPayServer/DefaultRules.cs
index 0d38d11..fcb2104 100644
--- a/BTCPayServer/DefaultRules.cs
+++ b/BTCPayServer/DefaultRules.cs
@@ -2,9 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using BTCPayServer.Data;
using BTCPayServer.Rating;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer;
public record DefaultRules(RateRules Rules)
diff --git a/BTCPayServer/DerivationSchemeParser.cs b/BTCPayServer/DerivationSchemeParser.cs
index 5216eb3..cd7c3a2 100644
--- a/BTCPayServer/DerivationSchemeParser.cs
+++ b/BTCPayServer/DerivationSchemeParser.cs
@@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text.RegularExpressions;
using NBitcoin;
using NBitcoin.Scripting;
using NBitcoin.WalletPolicies;
-using NBXplorer;
using NBXplorer.DerivationStrategy;
using static NBitcoin.WalletPolicies.MiniscriptNode;
diff --git a/BTCPayServer/DerivationSchemeSettings.cs b/BTCPayServer/DerivationSchemeSettings.cs
index e637c65..89b9619 100644
--- a/BTCPayServer/DerivationSchemeSettings.cs
+++ b/BTCPayServer/DerivationSchemeSettings.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using BTCPayServer.Payments;
using NBitcoin;
using NBXplorer.Client;
using NBXplorer.DerivationStrategy;
diff --git a/BTCPayServer/EventAggregator.cs b/BTCPayServer/EventAggregator.cs
index f098507..75dcaf1 100644
--- a/BTCPayServer/EventAggregator.cs
+++ b/BTCPayServer/EventAggregator.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
-using BTCPayServer.Events;
using BTCPayServer.Logging;
using Microsoft.Extensions.Logging;
diff --git a/BTCPayServer/Events/IHasInvoiceId.cs b/BTCPayServer/Events/IHasInvoiceId.cs
index 2d452a3..eeeeb36 100644
--- a/BTCPayServer/Events/IHasInvoiceId.cs
+++ b/BTCPayServer/Events/IHasInvoiceId.cs
@@ -1,8 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
namespace BTCPayServer.Events
{
public interface IHasInvoiceId
diff --git a/BTCPayServer/Events/UserEvent.cs b/BTCPayServer/Events/UserEvent.cs
index f38b6e9..b0333b2 100644
--- a/BTCPayServer/Events/UserEvent.cs
+++ b/BTCPayServer/Events/UserEvent.cs
@@ -1,11 +1,8 @@
#nullable enable
-using System;
using System.Threading.Tasks;
using BTCPayServer.Abstractions;
-using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Data;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Events;
diff --git a/BTCPayServer/Events/WalletChangedEvent.cs b/BTCPayServer/Events/WalletChangedEvent.cs
index ec52773..7b9a8f2 100644
--- a/BTCPayServer/Events/WalletChangedEvent.cs
+++ b/BTCPayServer/Events/WalletChangedEvent.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace BTCPayServer.Events
{
public class WalletChangedEvent
diff --git a/BTCPayServer/Extensions.cs b/BTCPayServer/Extensions.cs
index b4ea00e..f157edc 100644
--- a/BTCPayServer/Extensions.cs
+++ b/BTCPayServer/Extensions.cs
@@ -33,7 +33,6 @@ using BTCPayServer.NTag424;
using BTCPayServer.Payments;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Payments.Lightning;
-using BTCPayServer.Security;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Reporting;
diff --git a/BTCPayServer/Extensions/UserExtensions.cs b/BTCPayServer/Extensions/UserExtensions.cs
index 847058a..f080718 100644
--- a/BTCPayServer/Extensions/UserExtensions.cs
+++ b/BTCPayServer/Extensions/UserExtensions.cs
@@ -1,8 +1,5 @@
using System;
-using System.Linq;
using BTCPayServer.Data;
-using BTCPayServer.Services.Invoices;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer
{
diff --git a/BTCPayServer/Fido2/Models/LoginWithFido2ViewModel.cs b/BTCPayServer/Fido2/Models/LoginWithFido2ViewModel.cs
index 9142f02..a8ea688 100644
--- a/BTCPayServer/Fido2/Models/LoginWithFido2ViewModel.cs
+++ b/BTCPayServer/Fido2/Models/LoginWithFido2ViewModel.cs
@@ -1,6 +1,3 @@
-using Fido2NetLib;
-using Newtonsoft.Json.Linq;
-
namespace BTCPayServer.Fido2.Models
{
public class LoginWithFido2ViewModel
diff --git a/BTCPayServer/FileTypeDetector.cs b/BTCPayServer/FileTypeDetector.cs
index 8765ea6..bfcae2a 100644
--- a/BTCPayServer/FileTypeDetector.cs
+++ b/BTCPayServer/FileTypeDetector.cs
@@ -1,8 +1,6 @@
#nullable enable
using System;
using System.Linq;
-using Microsoft.EntityFrameworkCore;
-using NBitcoin.DataEncoders;
namespace BTCPayServer
{
diff --git a/BTCPayServer/Filters/CheatModeRouteAttribute.cs b/BTCPayServer/Filters/CheatModeRouteAttribute.cs
index cd48891..b906b4e 100644
--- a/BTCPayServer/Filters/CheatModeRouteAttribute.cs
+++ b/BTCPayServer/Filters/CheatModeRouteAttribute.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.Extensions.DependencyInjection;
diff --git a/BTCPayServer/Filters/ExperimentalRouteAttribute.cs b/BTCPayServer/Filters/ExperimentalRouteAttribute.cs
index a696181..2373bca 100644
--- a/BTCPayServer/Filters/ExperimentalRouteAttribute.cs
+++ b/BTCPayServer/Filters/ExperimentalRouteAttribute.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.Extensions.DependencyInjection;
diff --git a/BTCPayServer/Filters/JsonHttpExceptionFilter.cs b/BTCPayServer/Filters/JsonHttpExceptionFilter.cs
index 5d4c08a..3b1c146 100644
--- a/BTCPayServer/Filters/JsonHttpExceptionFilter.cs
+++ b/BTCPayServer/Filters/JsonHttpExceptionFilter.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Filters;
-using Microsoft.AspNetCore.Mvc.Infrastructure;
namespace BTCPayServer.Filters
{
diff --git a/BTCPayServer/Filters/JsonObjectExceptionFilter.cs b/BTCPayServer/Filters/JsonObjectExceptionFilter.cs
index 4627606..884f7fc 100644
--- a/BTCPayServer/Filters/JsonObjectExceptionFilter.cs
+++ b/BTCPayServer/Filters/JsonObjectExceptionFilter.cs
@@ -1,7 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
diff --git a/BTCPayServer/HandlersDictionary.cs b/BTCPayServer/HandlersDictionary.cs
index bc764e3..6d59514 100644
--- a/BTCPayServer/HandlersDictionary.cs
+++ b/BTCPayServer/HandlersDictionary.cs
@@ -1,10 +1,8 @@
#nullable enable
-using BTCPayServer.Payments;
using System.Diagnostics.CodeAnalysis;
using System;
using System.Collections.Generic;
using System.Collections;
-using Amazon.Runtime.Internal.Transform;
namespace BTCPayServer
{
diff --git a/BTCPayServer/HostedServices/BlobMigratorHostedService.cs b/BTCPayServer/HostedServices/BlobMigratorHostedService.cs
index 5228abd..58561b3 100644
--- a/BTCPayServer/HostedServices/BlobMigratorHostedService.cs
+++ b/BTCPayServer/HostedServices/BlobMigratorHostedService.cs
@@ -2,19 +2,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection.Metadata;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Data;
-using BTCPayServer.Services.Invoices;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using NBitcoin;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using static BTCPayServer.Controllers.UIInvoiceController;
namespace BTCPayServer.HostedServices;
diff --git a/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs b/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs
index 912577c..78bccaa 100644
--- a/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs
+++ b/BTCPayServer/HostedServices/InvoiceBlobMigratorHostedService.cs
@@ -2,23 +2,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection.Metadata;
using System.Threading;
using System.Threading.Tasks;
-using AngleSharp.Dom;
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Data;
-using BTCPayServer.Migrations;
using BTCPayServer.Services.Invoices;
-using Dapper;
-using Google.Apis.Logging;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using NBitcoin;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using static BTCPayServer.Controllers.UIInvoiceController;
namespace BTCPayServer.HostedServices;
diff --git a/BTCPayServer/HostedServices/InvoiceEventSaverService.cs b/BTCPayServer/HostedServices/InvoiceEventSaverService.cs
index fbd27b5..28c4bcc 100644
--- a/BTCPayServer/HostedServices/InvoiceEventSaverService.cs
+++ b/BTCPayServer/HostedServices/InvoiceEventSaverService.cs
@@ -1,13 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Logging;
using BTCPayServer.Services.Invoices;
-using NBXplorer;
namespace BTCPayServer.HostedServices
{
diff --git a/BTCPayServer/HostedServices/InvoiceWatcher.cs b/BTCPayServer/HostedServices/InvoiceWatcher.cs
index fceda6d..df57a3f 100644
--- a/BTCPayServer/HostedServices/InvoiceWatcher.cs
+++ b/BTCPayServer/HostedServices/InvoiceWatcher.cs
@@ -4,20 +4,16 @@ using System.Linq;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
-using AngleSharp.Dom;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Logging;
-using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Notifications;
using BTCPayServer.Services.Notifications.Blobs;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using NBitcoin;
using NBXplorer;
namespace BTCPayServer.HostedServices
diff --git a/BTCPayServer/HostedServices/NBXplorerWaiter.cs b/BTCPayServer/HostedServices/NBXplorerWaiter.cs
index 35b9a11..99c4551 100644
--- a/BTCPayServer/HostedServices/NBXplorerWaiter.cs
+++ b/BTCPayServer/HostedServices/NBXplorerWaiter.cs
@@ -8,7 +8,6 @@ using BTCPayServer.Events;
using BTCPayServer.Logging;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using NBitcoin;
using NBXplorer;
using NBXplorer.Models;
diff --git a/BTCPayServer/HostedServices/OnChainRateTrackerHostedService.cs b/BTCPayServer/HostedServices/OnChainRateTrackerHostedService.cs
index ab0a07d..41a3475 100644
--- a/BTCPayServer/HostedServices/OnChainRateTrackerHostedService.cs
+++ b/BTCPayServer/HostedServices/OnChainRateTrackerHostedService.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
@@ -11,7 +10,6 @@ using BTCPayServer.Rating;
using BTCPayServer.Services;
using BTCPayServer.Services.Rates;
using BTCPayServer.Services.Stores;
-using Microsoft.Extensions.Logging;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.HostedServices;
diff --git a/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs b/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
index bdc74b7..c2bf799 100644
--- a/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
+++ b/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
@@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection.Metadata;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Data;
-using BTCPayServer.Migrations;
using BTCPayServer.PaymentRequest;
-using BTCPayServer.Services.Invoices;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
diff --git a/BTCPayServer/HostedServices/PluginUpdateFetcher.cs b/BTCPayServer/HostedServices/PluginUpdateFetcher.cs
index 3b8ac8e..033f5d4 100644
--- a/BTCPayServer/HostedServices/PluginUpdateFetcher.cs
+++ b/BTCPayServer/HostedServices/PluginUpdateFetcher.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Net.Http;
-using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
@@ -11,11 +9,8 @@ using BTCPayServer.Controllers;
using BTCPayServer.Plugins;
using BTCPayServer.Services;
using BTCPayServer.Services.Notifications;
-using BTCPayServer.Services.Notifications.Blobs;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Localization;
-using Microsoft.Extensions.Logging;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.HostedServices
{
diff --git a/BTCPayServer/HostedServices/PullPaymentHostedService.cs b/BTCPayServer/HostedServices/PullPaymentHostedService.cs
index bb7d52b..b8386b0 100644
--- a/BTCPayServer/HostedServices/PullPaymentHostedService.cs
+++ b/BTCPayServer/HostedServices/PullPaymentHostedService.cs
@@ -11,7 +11,6 @@ using BTCPayServer.Events;
using BTCPayServer.Lightning;
using BTCPayServer.Logging;
using BTCPayServer.Models.WalletViewModels;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using BTCPayServer.Rating;
using BTCPayServer.Services;
@@ -19,14 +18,11 @@ using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Notifications;
using BTCPayServer.Services.Notifications.Blobs;
using BTCPayServer.Services.Rates;
-using Dapper;
-using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using NBitcoin;
using NBitcoin.DataEncoders;
using NBXplorer;
-using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PayoutData = BTCPayServer.Data.PayoutData;
using PullPaymentData = BTCPayServer.Data.PullPaymentData;
diff --git a/BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs b/BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs
index 4b4b561..c03890d 100644
--- a/BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs
+++ b/BTCPayServer/HostedServices/TransactionLabelMarkerHostedService.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@@ -7,15 +6,12 @@ using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Logging;
-using BTCPayServer.Payments;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.PaymentRequests;
-using Microsoft.Extensions.Logging;
using NBitcoin;
-using NBXplorer.DerivationStrategy;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.HostedServices
diff --git a/BTCPayServer/Hosting/BlockExplorerLinkStartupTask.cs b/BTCPayServer/Hosting/BlockExplorerLinkStartupTask.cs
index 8c69609..3d92e57 100644
--- a/BTCPayServer/Hosting/BlockExplorerLinkStartupTask.cs
+++ b/BTCPayServer/Hosting/BlockExplorerLinkStartupTask.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
diff --git a/BTCPayServer/Hosting/MigrationStartupTask.cs b/BTCPayServer/Hosting/MigrationStartupTask.cs
index 0000477..1916c61 100644
--- a/BTCPayServer/Hosting/MigrationStartupTask.cs
+++ b/BTCPayServer/Hosting/MigrationStartupTask.cs
@@ -32,7 +32,6 @@ using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using YamlDotNet.RepresentationModel;
-using static BTCPayServer.Fido2.Models.Fido2CredentialBlob;
using LightningAddressData = BTCPayServer.Data.LightningAddressData;
namespace BTCPayServer.Hosting
diff --git a/BTCPayServer/Hosting/SkippableObjectValidatorProvider.cs b/BTCPayServer/Hosting/SkippableObjectValidatorProvider.cs
index 766879a..a32dcfb 100644
--- a/BTCPayServer/Hosting/SkippableObjectValidatorProvider.cs
+++ b/BTCPayServer/Hosting/SkippableObjectValidatorProvider.cs
@@ -1,12 +1,9 @@
-using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Options;
-using NBitcoin;
namespace BTCPayServer.Hosting
{
diff --git a/BTCPayServer/Hosting/Startup.cs b/BTCPayServer/Hosting/Startup.cs
index 26fd340..78ddb7e 100644
--- a/BTCPayServer/Hosting/Startup.cs
+++ b/BTCPayServer/Hosting/Startup.cs
@@ -1,11 +1,9 @@
using System;
-using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Configuration;
-using BTCPayServer.Controllers.Greenfield;
using BTCPayServer.Data;
using BTCPayServer.Fido2;
using BTCPayServer.Filters;
@@ -18,7 +16,6 @@ using BTCPayServer.Services.Apps;
using BTCPayServer.Storage;
using Fido2NetLib;
using Microsoft.AspNetCore.Authentication;
-using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
@@ -33,7 +30,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
diff --git a/BTCPayServer/JsonConverters/PayoutMethodIdJsonConverter.cs b/BTCPayServer/JsonConverters/PayoutMethodIdJsonConverter.cs
index 3dc3d60..b3ca4ac 100644
--- a/BTCPayServer/JsonConverters/PayoutMethodIdJsonConverter.cs
+++ b/BTCPayServer/JsonConverters/PayoutMethodIdJsonConverter.cs
@@ -1,5 +1,4 @@
using System;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
diff --git a/BTCPayServer/JsonConverters/UnresolvedUriJsonConverter.cs b/BTCPayServer/JsonConverters/UnresolvedUriJsonConverter.cs
index 7ad6798..dbc435d 100644
--- a/BTCPayServer/JsonConverters/UnresolvedUriJsonConverter.cs
+++ b/BTCPayServer/JsonConverters/UnresolvedUriJsonConverter.cs
@@ -1,6 +1,4 @@
using System;
-using System.Reflection;
-using BTCPayServer.Payouts;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
diff --git a/BTCPayServer/JsonHttpException.cs b/BTCPayServer/JsonHttpException.cs
index 8a07fee..dd86993 100644
--- a/BTCPayServer/JsonHttpException.cs
+++ b/BTCPayServer/JsonHttpException.cs
@@ -1,8 +1,5 @@
#nullable enable
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer
diff --git a/BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs b/BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs
index 1d9838e..2c7501a 100644
--- a/BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs
+++ b/BTCPayServer/ModelBinders/DateTimeOffsetModelBinder.cs
@@ -1,11 +1,8 @@
using System;
-using System.Collections.Generic;
using System.Globalization;
-using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
-using Microsoft.VisualBasic.CompilerServices;
namespace BTCPayServer.ModelBinders
{
diff --git a/BTCPayServer/ModelBinders/DefaultModelBinderProvider.cs b/BTCPayServer/ModelBinders/DefaultModelBinderProvider.cs
index fe44704..82d9f04 100644
--- a/BTCPayServer/ModelBinders/DefaultModelBinderProvider.cs
+++ b/BTCPayServer/ModelBinders/DefaultModelBinderProvider.cs
@@ -1,8 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Threading.Tasks;
using BTCPayServer.Payments;
using Microsoft.AspNetCore.Mvc.ModelBinding;
diff --git a/BTCPayServer/ModelBinders/DerivationSchemeModelBinder.cs b/BTCPayServer/ModelBinders/DerivationSchemeModelBinder.cs
index 5a576b0..eb02c32 100644
--- a/BTCPayServer/ModelBinders/DerivationSchemeModelBinder.cs
+++ b/BTCPayServer/ModelBinders/DerivationSchemeModelBinder.cs
@@ -1,4 +1,3 @@
-using System;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.ModelBinding;
diff --git a/BTCPayServer/Models/IHasBackAndReturnUrl.cs b/BTCPayServer/Models/IHasBackAndReturnUrl.cs
index b4924eb..263ec69 100644
--- a/BTCPayServer/Models/IHasBackAndReturnUrl.cs
+++ b/BTCPayServer/Models/IHasBackAndReturnUrl.cs
@@ -1,6 +1,5 @@
#nullable enable
using System;
-using BTCPayServer.Controllers;
namespace BTCPayServer.Models
{
diff --git a/BTCPayServer/Models/InvoiceResponse.cs b/BTCPayServer/Models/InvoiceResponse.cs
index a5e36ff..24f004c 100644
--- a/BTCPayServer/Models/InvoiceResponse.cs
+++ b/BTCPayServer/Models/InvoiceResponse.cs
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
-using BTCPayServer.Client.Models;
using BTCPayServer.Services.Invoices;
using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Models
diff --git a/BTCPayServer/Models/InvoicingModels/CheckoutModel.cs b/BTCPayServer/Models/InvoicingModels/CheckoutModel.cs
index 3057500..70567fd 100644
--- a/BTCPayServer/Models/InvoicingModels/CheckoutModel.cs
+++ b/BTCPayServer/Models/InvoicingModels/CheckoutModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using BTCPayServer.Client.Models;
using BTCPayServer.JsonConverters;
using BTCPayServer.Payments;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs b/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs
index 995a8e2..c86d2de 100644
--- a/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs
+++ b/BTCPayServer/Models/InvoicingModels/CreateInvoiceModel.cs
@@ -1,9 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using BTCPayServer.Client.Models;
-using BTCPayServer.Services.Apps;
using BTCPayServer.Validation;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs b/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs
index 8b007e8..e62e61f 100644
--- a/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs
+++ b/BTCPayServer/Models/NotificationViewModels/IndexViewModel.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using BTCPayServer.Abstractions.Contracts;
-using BTCPayServer.Data;
namespace BTCPayServer.Models.NotificationViewModels
{
diff --git a/BTCPayServer/Models/PaymentRequestViewModels/PaymentRequestLabelsViewModel.cs b/BTCPayServer/Models/PaymentRequestViewModels/PaymentRequestLabelsViewModel.cs
index 1d4698a..efe8542 100644
--- a/BTCPayServer/Models/PaymentRequestViewModels/PaymentRequestLabelsViewModel.cs
+++ b/BTCPayServer/Models/PaymentRequestViewModels/PaymentRequestLabelsViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using BTCPayServer.Services.Labels;
namespace BTCPayServer.Models.PaymentRequestViewModels;
diff --git a/BTCPayServer/Models/StoreReportsViewModels/StoreReportsViewModel.cs b/BTCPayServer/Models/StoreReportsViewModels/StoreReportsViewModel.cs
index 59647fa..8e203be 100644
--- a/BTCPayServer/Models/StoreReportsViewModels/StoreReportsViewModel.cs
+++ b/BTCPayServer/Models/StoreReportsViewModels/StoreReportsViewModel.cs
@@ -1,9 +1,6 @@
-using System;
using System.Collections.Generic;
using BTCPayServer.Client.Models;
using BTCPayServer.Payments;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
namespace BTCPayServer.Models.StoreReportsViewModels;
diff --git a/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs b/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs
index 3b1b126..bdd4570 100644
--- a/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs
+++ b/BTCPayServer/Models/StoreViewModels/CheckoutAppearanceViewModel.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
diff --git a/BTCPayServer/Models/StoreViewModels/RecoverySeedBackupViewModel.cs b/BTCPayServer/Models/StoreViewModels/RecoverySeedBackupViewModel.cs
index 412b5c1..beb61fa 100644
--- a/BTCPayServer/Models/StoreViewModels/RecoverySeedBackupViewModel.cs
+++ b/BTCPayServer/Models/StoreViewModels/RecoverySeedBackupViewModel.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using Microsoft.AspNetCore.Http;
-using NBitcoin;
namespace BTCPayServer.Models.StoreViewModels
{
diff --git a/BTCPayServer/Models/StoreViewModels/WalletSetupRequest.cs b/BTCPayServer/Models/StoreViewModels/WalletSetupRequest.cs
index d6a31f5..9d043f1 100644
--- a/BTCPayServer/Models/StoreViewModels/WalletSetupRequest.cs
+++ b/BTCPayServer/Models/StoreViewModels/WalletSetupRequest.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using NBXplorer.Models;
namespace BTCPayServer.Models.StoreViewModels
diff --git a/BTCPayServer/Models/StoreViewModels/WalletSetupViewModel.cs b/BTCPayServer/Models/StoreViewModels/WalletSetupViewModel.cs
index 11a0203..f4770e2 100644
--- a/BTCPayServer/Models/StoreViewModels/WalletSetupViewModel.cs
+++ b/BTCPayServer/Models/StoreViewModels/WalletSetupViewModel.cs
@@ -1,4 +1,3 @@
-using System;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace BTCPayServer.Models.StoreViewModels
diff --git a/BTCPayServer/Models/WalletViewModels/ListWalletsViewModel.cs b/BTCPayServer/Models/WalletViewModels/ListWalletsViewModel.cs
index edaf85b..60e4652 100644
--- a/BTCPayServer/Models/WalletViewModels/ListWalletsViewModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/ListWalletsViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using BTCPayServer;
using NBitcoin;
namespace BTCPayServer.Models.WalletViewModels
diff --git a/BTCPayServer/Models/WalletViewModels/PayoutsModel.cs b/BTCPayServer/Models/WalletViewModels/PayoutsModel.cs
index 714919b..c425592 100644
--- a/BTCPayServer/Models/WalletViewModels/PayoutsModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/PayoutsModel.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Client.Models;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
namespace BTCPayServer.Models.WalletViewModels
diff --git a/BTCPayServer/Models/WalletViewModels/PullPaymentsModel.cs b/BTCPayServer/Models/WalletViewModels/PullPaymentsModel.cs
index 78b7836..3fc8be2 100644
--- a/BTCPayServer/Models/WalletViewModels/PullPaymentsModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/PullPaymentsModel.cs
@@ -4,7 +4,6 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
-using BTCPayServer.Payments;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Models.WalletViewModels
diff --git a/BTCPayServer/Models/WalletViewModels/RescanWalletModel.cs b/BTCPayServer/Models/WalletViewModels/RescanWalletModel.cs
index bd70c8e..6f54f8a 100644
--- a/BTCPayServer/Models/WalletViewModels/RescanWalletModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/RescanWalletModel.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using NBXplorer.Models;
diff --git a/BTCPayServer/Models/WalletViewModels/WalletBumpFeeViewModel.cs b/BTCPayServer/Models/WalletViewModels/WalletBumpFeeViewModel.cs
index 24e9657..61463c3 100644
--- a/BTCPayServer/Models/WalletViewModels/WalletBumpFeeViewModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/WalletBumpFeeViewModel.cs
@@ -1,10 +1,8 @@
-using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Microsoft.AspNetCore.Mvc.Rendering;
using NBitcoin;
-using static BTCPayServer.Models.WalletViewModels.WalletBumpFeeViewModel;
namespace BTCPayServer.Models.WalletViewModels
{
diff --git a/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs b/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs
index c441f52..65400e3 100644
--- a/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs
@@ -1,4 +1,3 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using NBitcoin;
diff --git a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs
index 6e146e4..213aa1f 100644
--- a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using BTCPayServer.Services.Labels;
namespace BTCPayServer.Models.WalletViewModels
{
diff --git a/BTCPayServer/Models/WalletViewModels/WalletSigningOptionsModel.cs b/BTCPayServer/Models/WalletViewModels/WalletSigningOptionsModel.cs
index 37cc1cc..ab373a4 100644
--- a/BTCPayServer/Models/WalletViewModels/WalletSigningOptionsModel.cs
+++ b/BTCPayServer/Models/WalletViewModels/WalletSigningOptionsModel.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace BTCPayServer.Models.WalletViewModels
{
public class WalletSigningOptionsModel : IHasBackAndReturnUrl
diff --git a/BTCPayServer/PaymentRequest/PaymentRequestHub.cs b/BTCPayServer/PaymentRequest/PaymentRequestHub.cs
index 269d803..f840831 100644
--- a/BTCPayServer/PaymentRequest/PaymentRequestHub.cs
+++ b/BTCPayServer/PaymentRequest/PaymentRequestHub.cs
@@ -1,23 +1,17 @@
-using System;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.Client.Models;
using BTCPayServer.Controllers;
-using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.HostedServices;
using BTCPayServer.Logging;
using BTCPayServer.Services;
using BTCPayServer.Services.PaymentRequests;
-using Google.Apis.Storage.v1.Data;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.SignalR;
-using Microsoft.Extensions.Logging;
namespace BTCPayServer.PaymentRequest
{
diff --git a/BTCPayServer/PaymentRequest/PaymentRequestService.cs b/BTCPayServer/PaymentRequest/PaymentRequestService.cs
index fa95f90..0f89327 100644
--- a/BTCPayServer/PaymentRequest/PaymentRequestService.cs
+++ b/BTCPayServer/PaymentRequest/PaymentRequestService.cs
@@ -4,13 +4,10 @@ using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Models.PaymentRequestViewModels;
-using BTCPayServer.Payments;
using BTCPayServer.Services;
-using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.PaymentRequests;
using BTCPayServer.Services.Rates;
-using static System.Runtime.InteropServices.JavaScript.JSType;
using PaymentRequestData = BTCPayServer.Data.PaymentRequestData;
namespace BTCPayServer.PaymentRequest
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutCheatModeExtension.cs b/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutCheatModeExtension.cs
index 87707f0..763b8e2 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutCheatModeExtension.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutCheatModeExtension.cs
@@ -1,8 +1,6 @@
using System.Threading.Tasks;
-using BTCPayServer.Services.Invoices;
using BTCPayServer.Services;
using NBitcoin;
-using ExchangeSharp.BinanceGroup;
namespace BTCPayServer.Payments.Bitcoin
{
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs b/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs
index 5459748..0a96faa 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinCheckoutModelExtension.cs
@@ -5,8 +5,6 @@ using System.Globalization;
using System.Linq;
using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Services;
-using BTCPayServer.Services.Invoices;
-using Microsoft.AspNetCore.Mvc;
using NBitcoin;
using NBitcoin.DataEncoders;
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs b/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs
index 69f2e72..206bffa 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentData.cs
@@ -1,7 +1,5 @@
using System.Linq;
using BTCPayServer.Client.JsonConverters;
-using BTCPayServer.Client.Models;
-using BTCPayServer.Services.Invoices;
using NBitcoin;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs b/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs
index 07b8f3e..2222641 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinLikePaymentHandler.cs
@@ -1,30 +1,17 @@
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
-using AngleSharp.Dom;
-using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.BIP78.Sender;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
-using BTCPayServer.Lightning;
-using BTCPayServer.Logging;
-using BTCPayServer.Models;
-using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Plugins.Altcoins;
using BTCPayServer.Services;
-using BTCPayServer.Services.Invoices;
using NBitcoin;
-using NBitcoin.DataEncoders;
-using NBitpayClient;
using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using static Org.BouncyCastle.Math.EC.ECCurve;
-using StoreData = BTCPayServer.Data.StoreData;
namespace BTCPayServer.Payments.Bitcoin
{
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodBitpayAPIExtension.cs b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodBitpayAPIExtension.cs
index ed3d025..686a5e5 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodBitpayAPIExtension.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentMethodBitpayAPIExtension.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Models;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentPromptDetails.cs b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentPromptDetails.cs
index 234b1f8..bfa51d9 100644
--- a/BTCPayServer/Payments/Bitcoin/BitcoinPaymentPromptDetails.cs
+++ b/BTCPayServer/Payments/Bitcoin/BitcoinPaymentPromptDetails.cs
@@ -1,6 +1,3 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
using BTCPayServer.Client.Models;
using NBitcoin;
using NBXplorer.DerivationStrategy;
diff --git a/BTCPayServer/Payments/ICheckoutCheatModeExtension.cs b/BTCPayServer/Payments/ICheckoutCheatModeExtension.cs
index 3137b1f..95a5d67 100644
--- a/BTCPayServer/Payments/ICheckoutCheatModeExtension.cs
+++ b/BTCPayServer/Payments/ICheckoutCheatModeExtension.cs
@@ -2,7 +2,6 @@
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Services.Invoices;
-using NBitcoin;
namespace BTCPayServer.Payments
{
diff --git a/BTCPayServer/Payments/IPaymentMethodHandler.cs b/BTCPayServer/Payments/IPaymentMethodHandler.cs
index a577742..7216699 100644
--- a/BTCPayServer/Payments/IPaymentMethodHandler.cs
+++ b/BTCPayServer/Payments/IPaymentMethodHandler.cs
@@ -1,29 +1,20 @@
#nullable enable
using System;
using System.Collections.Generic;
-using System.Globalization;
using System.Linq;
using System.Security.Claims;
using System.Threading;
using System.Threading.Tasks;
-using AngleSharp.Dom;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Logging;
-using BTCPayServer.Migrations;
-using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Rating;
-using BTCPayServer.Services;
-using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.ModelBinding;
-using NBitcoin;
-using NBitcoin.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using InvoiceResponse = BTCPayServer.Models.InvoiceResponse;
namespace BTCPayServer.Payments
{
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLCheckoutModelExtension.cs b/BTCPayServer/Payments/LNURLPay/LNURLCheckoutModelExtension.cs
index 8246cb0..6a8d288 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLCheckoutModelExtension.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLCheckoutModelExtension.cs
@@ -4,7 +4,6 @@ using BTCPayServer.Services;
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Payments.Lightning;
-using NBitcoin;
namespace BTCPayServer.Payments.LNURLPay
{
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentHandler.cs b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentHandler.cs
index 9ddc051..1a51cd9 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentHandler.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentHandler.cs
@@ -1,25 +1,14 @@
#nullable enable
using System;
-using System.Collections.Generic;
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
-using AngleSharp.Dom;
-using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client.Models;
using BTCPayServer.Configuration;
using BTCPayServer.Data;
-using BTCPayServer.Lightning;
-using BTCPayServer.Logging;
-using BTCPayServer.Models;
-using BTCPayServer.Models.InvoicingModels;
-using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
-using NBitcoin;
-using NBitpayClient;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentLinkExtension.cs b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentLinkExtension.cs
index 4dc93cc..ba83bac 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentLinkExtension.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentLinkExtension.cs
@@ -1,10 +1,8 @@
#nullable enable
-using BTCPayServer.Abstractions.Extensions;
using System;
using BTCPayServer.Services.Invoices;
using Microsoft.AspNetCore.Mvc;
using BTCPayServer.Payments.Lightning;
-using NBitcoin;
namespace BTCPayServer.Payments.LNURLPay
{
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodBitpayAPIExtension.cs b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodBitpayAPIExtension.cs
index 3d2549a..4215b46 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodBitpayAPIExtension.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodBitpayAPIExtension.cs
@@ -1,9 +1,6 @@
using BTCPayServer.Models;
-using BTCPayServer.Payments.Bitcoin;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services.Invoices;
using Microsoft.AspNetCore.Mvc;
-using NBitpayClient;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Linq;
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodDetails.cs b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodDetails.cs
index d666443..15bb6d6 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodDetails.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLPayPaymentMethodDetails.cs
@@ -1,11 +1,8 @@
-using System.Collections.Generic;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Lightning;
using BTCPayServer.Payments.Lightning;
-using BTCPayServer.Services.Invoices;
using LNURL;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Payments
{
diff --git a/BTCPayServer/Payments/LNURLPay/LNURLPaymentMethodConfig.cs b/BTCPayServer/Payments/LNURLPay/LNURLPaymentMethodConfig.cs
index d50809c..c7ca220 100644
--- a/BTCPayServer/Payments/LNURLPay/LNURLPaymentMethodConfig.cs
+++ b/BTCPayServer/Payments/LNURLPay/LNURLPaymentMethodConfig.cs
@@ -1,6 +1,4 @@
#nullable enable
-using System;
-using BTCPayServer.Lightning;
using Newtonsoft.Json;
namespace BTCPayServer.Payments.Lightning
diff --git a/BTCPayServer/Payments/Lightning/LNCheckoutModelExtension.cs b/BTCPayServer/Payments/Lightning/LNCheckoutModelExtension.cs
index e689930..bbd22ea 100644
--- a/BTCPayServer/Payments/Lightning/LNCheckoutModelExtension.cs
+++ b/BTCPayServer/Payments/Lightning/LNCheckoutModelExtension.cs
@@ -1,9 +1,7 @@
#nullable enable
-using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services;
-using Org.BouncyCastle.Crypto.Modes.Gcm;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Localization;
diff --git a/BTCPayServer/Payments/Lightning/LightningCheckoutCheatModeExtension.cs b/BTCPayServer/Payments/Lightning/LightningCheckoutCheatModeExtension.cs
index 61ce53a..5992178 100644
--- a/BTCPayServer/Payments/Lightning/LightningCheckoutCheatModeExtension.cs
+++ b/BTCPayServer/Payments/Lightning/LightningCheckoutCheatModeExtension.cs
@@ -3,8 +3,6 @@ using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Lightning;
using BTCPayServer.Services;
-using BTCPayServer.Services.Invoices;
-using NBitcoin;
using static BTCPayServer.Payments.ICheckoutCheatModeExtension;
namespace BTCPayServer.Payments.Lightning
diff --git a/BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs b/BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs
index c84d0d0..183a86b 100644
--- a/BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs
+++ b/BTCPayServer/Payments/Lightning/LightningLikePaymentData.cs
@@ -1,7 +1,3 @@
-using BTCPayServer.Client.Models;
-using BTCPayServer.Lightning;
-using BTCPayServer.Lightning.JsonConverters;
-using BTCPayServer.Services.Invoices;
using NBitcoin;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Payments/Lightning/LightningPaymentMethodBitpayAPIExtension.cs b/BTCPayServer/Payments/Lightning/LightningPaymentMethodBitpayAPIExtension.cs
index 8f88793..bef82b2 100644
--- a/BTCPayServer/Payments/Lightning/LightningPaymentMethodBitpayAPIExtension.cs
+++ b/BTCPayServer/Payments/Lightning/LightningPaymentMethodBitpayAPIExtension.cs
@@ -4,9 +4,6 @@ using System.Linq;
using BTCPayServer.Models;
using BTCPayServer.Services.Invoices;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Routing;
-using NBitpayClient;
namespace BTCPayServer.Payments.Lightning;
diff --git a/BTCPayServer/Payments/Lightning/LigthningPaymentPromptDetails.cs b/BTCPayServer/Payments/Lightning/LigthningPaymentPromptDetails.cs
index 7e5c85e..b87e948 100644
--- a/BTCPayServer/Payments/Lightning/LigthningPaymentPromptDetails.cs
+++ b/BTCPayServer/Payments/Lightning/LigthningPaymentPromptDetails.cs
@@ -1,10 +1,5 @@
-using System.Collections.Generic;
-using System.Linq;
-using BTCPayServer.Lightning;
-using BTCPayServer.Services.Invoices;
using NBitcoin;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Payments.Lightning
{
diff --git a/BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs b/BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
index cd2c8d0..28f86e0 100644
--- a/BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
+++ b/BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
@@ -16,13 +16,11 @@ using BTCPayServer.Logging;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
-using BTCPayServer.Services.Labels;
using BTCPayServer.Services.Stores;
using BTCPayServer.Services.Wallets;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
-using NBitcoin.Altcoins;
using NBitcoin.Crypto;
using NBitcoin.DataEncoders;
using NBXplorer;
diff --git a/BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs b/BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs
index 45dbfc5..9a25246 100644
--- a/BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs
+++ b/BTCPayServer/Payments/PayJoin/PayJoinExtensions.cs
@@ -1,5 +1,4 @@
using BTCPayServer.BIP78.Sender;
-using BTCPayServer.HostedServices;
using BTCPayServer.Payments.PayJoin.Sender;
using BTCPayServer.Services;
using Microsoft.Extensions.DependencyInjection;
diff --git a/BTCPayServer/Payments/PayJoin/PayjoinReceiverContext.cs b/BTCPayServer/Payments/PayJoin/PayjoinReceiverContext.cs
index afa4335..2ba67ff 100644
--- a/BTCPayServer/Payments/PayJoin/PayjoinReceiverContext.cs
+++ b/BTCPayServer/Payments/PayJoin/PayjoinReceiverContext.cs
@@ -6,7 +6,6 @@ using BTCPayServer.Logging;
using BTCPayServer.Services.Invoices;
using Microsoft.Extensions.Logging;
using NBitcoin;
-using NBitpayClient;
using NBXplorer;
namespace BTCPayServer.Payments.PayJoin
diff --git a/BTCPayServer/PayoutProcessors/IPayoutProcessorFactory.cs b/BTCPayServer/PayoutProcessors/IPayoutProcessorFactory.cs
index d452724..ad38690 100644
--- a/BTCPayServer/PayoutProcessors/IPayoutProcessorFactory.cs
+++ b/BTCPayServer/PayoutProcessors/IPayoutProcessorFactory.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
diff --git a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs
index bab2b6f..4c6cc78 100644
--- a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs
+++ b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutProcessor.cs
@@ -1,11 +1,9 @@
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
-using BTCPayServer.Client;
using BTCPayServer.Client.Models;
using BTCPayServer.Configuration;
using BTCPayServer.Data;
@@ -13,18 +11,14 @@ using BTCPayServer.Data.Payouts.LightningLike;
using BTCPayServer.HostedServices;
using BTCPayServer.Lightning;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Payments.Lightning;
using BTCPayServer.Payouts;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Stores;
using LNURL;
-using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
-using NBitcoin;
-using Newtonsoft.Json.Linq;
using static BTCPayServer.Data.Payouts.LightningLike.UILightningLikePayoutController;
using MarkPayoutRequest = BTCPayServer.HostedServices.MarkPayoutRequest;
using PayoutData = BTCPayServer.Data.PayoutData;
diff --git a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutSenderFactory.cs b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutSenderFactory.cs
index 4336f4c..7a58f68 100644
--- a/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutSenderFactory.cs
+++ b/BTCPayServer/PayoutProcessors/Lightning/LightningAutomatedPayoutSenderFactory.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Data.Payouts.LightningLike;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
diff --git a/BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutSenderFactory.cs b/BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutSenderFactory.cs
index 22b0574..b98d05e 100644
--- a/BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutSenderFactory.cs
+++ b/BTCPayServer/PayoutProcessors/OnChain/OnChainAutomatedPayoutSenderFactory.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
diff --git a/BTCPayServer/PayoutProcessors/PayoutProcessorService.cs b/BTCPayServer/PayoutProcessors/PayoutProcessorService.cs
index 47b80c9..5102d7e 100644
--- a/BTCPayServer/PayoutProcessors/PayoutProcessorService.cs
+++ b/BTCPayServer/PayoutProcessors/PayoutProcessorService.cs
@@ -7,7 +7,6 @@ using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
using BTCPayServer.Logging;
-using BTCPayServer.Payments;
using BTCPayServer.Payouts;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
diff --git a/BTCPayServer/PayoutProcessors/PayoutProcessorsExtensions.cs b/BTCPayServer/PayoutProcessors/PayoutProcessorsExtensions.cs
index 16d66f6..787ab1b 100644
--- a/BTCPayServer/PayoutProcessors/PayoutProcessorsExtensions.cs
+++ b/BTCPayServer/PayoutProcessors/PayoutProcessorsExtensions.cs
@@ -1,5 +1,4 @@
using BTCPayServer.Data;
-using BTCPayServer.Payments;
using BTCPayServer.PayoutProcessors.Lightning;
using BTCPayServer.PayoutProcessors.OnChain;
using BTCPayServer.Payouts;
diff --git a/BTCPayServer/Payouts/PayoutMethodHandlerDictionary.cs b/BTCPayServer/Payouts/PayoutMethodHandlerDictionary.cs
index 728e80a..65175a8 100644
--- a/BTCPayServer/Payouts/PayoutMethodHandlerDictionary.cs
+++ b/BTCPayServer/Payouts/PayoutMethodHandlerDictionary.cs
@@ -1,9 +1,4 @@
-using BTCPayServer.Payments;
-using BTCPayServer.Services.Invoices;
-using Newtonsoft.Json.Linq;
-using System;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
namespace BTCPayServer.Payouts
{
diff --git a/BTCPayServer/Payouts/PayoutMethodId.cs b/BTCPayServer/Payouts/PayoutMethodId.cs
index 6a8b8ba..66ed514 100644
--- a/BTCPayServer/Payouts/PayoutMethodId.cs
+++ b/BTCPayServer/Payouts/PayoutMethodId.cs
@@ -1,10 +1,6 @@
#nullable enable
using System;
-using System.Collections.Frozen;
-using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using BTCPayServer.Payments;
namespace BTCPayServer.Payouts
{
diff --git a/BTCPayServer/Payouts/PayoutTypes.cs b/BTCPayServer/Payouts/PayoutTypes.cs
index 6b4d2d9..700645e 100644
--- a/BTCPayServer/Payouts/PayoutTypes.cs
+++ b/BTCPayServer/Payouts/PayoutTypes.cs
@@ -1,5 +1,3 @@
-using BTCPayServer.Payments;
-
namespace BTCPayServer.Payouts
{
public class PayoutMethodIds
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.BGold.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.BGold.cs
index 4c58fb7..f215223 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.BGold.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.BGold.cs
@@ -1,8 +1,6 @@
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dash.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dash.cs
index 7dc3d75..832e871 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dash.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dash.cs
@@ -1,7 +1,6 @@
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs
index 33f9306..6561344 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Dogecoin.cs
@@ -1,10 +1,8 @@
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
-using NBXplorer;
namespace BTCPayServer.Plugins.Altcoins;
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Groestlcoin.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Groestlcoin.cs
index 78937ba..5a4515d 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Groestlcoin.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Groestlcoin.cs
@@ -1,7 +1,6 @@
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Litecoin.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Litecoin.cs
index abff891..226a2b6 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Litecoin.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Litecoin.cs
@@ -2,10 +2,8 @@ using System.Collections.Generic;
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
-using NBXplorer;
namespace BTCPayServer.Plugins.Altcoins;
diff --git a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Monacoin.cs b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Monacoin.cs
index a669a38..73586e5 100644
--- a/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Monacoin.cs
+++ b/BTCPayServer/Plugins/Altcoins/AltcoinsPlugin.Monacoin.cs
@@ -3,7 +3,6 @@ using BTCPayServer.Payments;
using BTCPayServer.Services;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
-using NBXplorer;
namespace BTCPayServer.Plugins.Altcoins;
diff --git a/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.Liquid.cs b/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.Liquid.cs
index c855eb8..c8d6527 100644
--- a/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.Liquid.cs
+++ b/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.Liquid.cs
@@ -5,7 +5,6 @@ using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
using NBitcoin.Altcoins;
using NBitcoin.Altcoins.Elements;
-using NBXplorer;
namespace BTCPayServer.Plugins.Altcoins;
public partial class AltcoinsPlugin
diff --git a/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.LiquidAssets.cs b/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.LiquidAssets.cs
index 4b397db..f1ee417 100644
--- a/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.LiquidAssets.cs
+++ b/BTCPayServer/Plugins/Altcoins/Liquid/AltcoinsPlugin.LiquidAssets.cs
@@ -1,9 +1,7 @@
-using System.Threading;
using BTCPayServer.Hosting;
using BTCPayServer.Payments;
using BTCPayServer.Services;
using BTCPayServer.Services.Rates;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
diff --git a/BTCPayServer/Plugins/BTCPayServerPlugin.cs b/BTCPayServer/Plugins/BTCPayServerPlugin.cs
index 26a1c4a..fb770bd 100644
--- a/BTCPayServer/Plugins/BTCPayServerPlugin.cs
+++ b/BTCPayServer/Plugins/BTCPayServerPlugin.cs
@@ -1,5 +1,4 @@
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Models;
namespace BTCPayServer.Plugins
{
diff --git a/BTCPayServer/Plugins/Bitpay/Controllers/UIStoresTokenController.cs b/BTCPayServer/Plugins/Bitpay/Controllers/UIStoresTokenController.cs
index 3c6be52..257a6f4 100644
--- a/BTCPayServer/Plugins/Bitpay/Controllers/UIStoresTokenController.cs
+++ b/BTCPayServer/Plugins/Bitpay/Controllers/UIStoresTokenController.cs
@@ -14,7 +14,6 @@ using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Localization;
diff --git a/BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml b/BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml
index afdf9ec..3c79977 100644
--- a/BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml
+++ b/BTCPayServer/Plugins/Bitpay/Views/ListTokens.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Client
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model TokensViewModel
@{
Layout = "_Layout";
diff --git a/BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs b/BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs
index 778d952..76e5f0f 100644
--- a/BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs
+++ b/BTCPayServer/Plugins/Crowdfund/CrowdfundPlugin.cs
@@ -3,23 +3,18 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Abstractions.Services;
using BTCPayServer.Client.Models;
using BTCPayServer.Configuration;
using BTCPayServer.Data;
-using BTCPayServer.Models;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Plugins.Crowdfund.Controllers;
using BTCPayServer.Plugins.Crowdfund.Models;
using BTCPayServer.Services;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
-using Ganss.Xss;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
diff --git a/BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml b/BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml
index fbccf05..87ab7b6 100644
--- a/BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml
+++ b/BTCPayServer/Plugins/Crowdfund/Views/Public/ContributeForm.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Client.Models
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.Plugins.Crowdfund.Models.ContributeToCrowdfund
@{ var vm = Model.ViewCrowdfundViewModel; }
diff --git a/BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml b/BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml
index 4882156..69bcaa8 100644
--- a/BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml
+++ b/BTCPayServer/Plugins/Crowdfund/Views/UpdateCrowdfund.cshtml
@@ -1,9 +1,6 @@
@using System.Globalization
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client
-@using BTCPayServer.TagHelpers
-@using BTCPayServer.Views.Apps
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Forms
@using BTCPayServer.Plugins.Crowdfund
@inject FormDataService FormDataService
diff --git a/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailController.cs b/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailController.cs
index 04c4d3e..7d0bdbb 100644
--- a/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailController.cs
+++ b/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailController.cs
@@ -7,7 +7,6 @@ using BTCPayServer.Plugins.Emails.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
-using MimeKit;
namespace BTCPayServer.Plugins.Emails.Controllers;
diff --git a/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailRulesController.cs b/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailRulesController.cs
index b2eb5fa..a8b1d7b 100644
--- a/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailRulesController.cs
+++ b/BTCPayServer/Plugins/Emails/Controllers/UIServerEmailRulesController.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
diff --git a/BTCPayServer/Plugins/Emails/Controllers/UIStoreEmailRulesController.cs b/BTCPayServer/Plugins/Emails/Controllers/UIStoreEmailRulesController.cs
index ff64e84..0e0b5b3 100644
--- a/BTCPayServer/Plugins/Emails/Controllers/UIStoreEmailRulesController.cs
+++ b/BTCPayServer/Plugins/Emails/Controllers/UIStoreEmailRulesController.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
diff --git a/BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs b/BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs
index 132a5cd..c6eb0bb 100644
--- a/BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs
+++ b/BTCPayServer/Plugins/Emails/HostedServices/UserEventTriggerHostedService.cs
@@ -7,7 +7,6 @@ using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.HostedServices;
using BTCPayServer.Logging;
-using BTCPayServer.Services;
using BTCPayServer.Services.Notifications;
using BTCPayServer.Services.Notifications.Blobs;
using Microsoft.AspNetCore.Identity;
diff --git a/BTCPayServer/Plugins/Emails/IEmailTriggerEventTransformer.cs b/BTCPayServer/Plugins/Emails/IEmailTriggerEventTransformer.cs
index 8d84c39..f0f5b81 100644
--- a/BTCPayServer/Plugins/Emails/IEmailTriggerEventTransformer.cs
+++ b/BTCPayServer/Plugins/Emails/IEmailTriggerEventTransformer.cs
@@ -1,6 +1,5 @@
using BTCPayServer.Data;
using BTCPayServer.Plugins.Emails.HostedServices;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Plugins.Emails;
diff --git a/BTCPayServer/Plugins/Emails/Services/EmailSettings.cs b/BTCPayServer/Plugins/Emails/Services/EmailSettings.cs
index 41a255f..d279d6d 100644
--- a/BTCPayServer/Plugins/Emails/Services/EmailSettings.cs
+++ b/BTCPayServer/Plugins/Emails/Services/EmailSettings.cs
@@ -1,4 +1,3 @@
-using System.ComponentModel.DataAnnotations;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
diff --git a/BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs b/BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs
index d50ac5d..3523213 100644
--- a/BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs
+++ b/BTCPayServer/Plugins/Monetization/Controllers/UIServerMonetizationController.cs
@@ -19,7 +19,6 @@ using BTCPayServer.Services.Rates;
using BTCPayServer.Services.Stores;
using BTCPayServer.Views.UIStoreMembership;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.Rendering;
diff --git a/BTCPayServer/Plugins/Monetization/Controllers/UIUserMonetizationController.cs b/BTCPayServer/Plugins/Monetization/Controllers/UIUserMonetizationController.cs
index 1661e33..2109164 100644
--- a/BTCPayServer/Plugins/Monetization/Controllers/UIUserMonetizationController.cs
+++ b/BTCPayServer/Plugins/Monetization/Controllers/UIUserMonetizationController.cs
@@ -8,7 +8,6 @@ using BTCPayServer.Data.Subscriptions;
using BTCPayServer.Plugins.Subscriptions;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer/Plugins/Monetization/LinkGenerator.Monetization.cs b/BTCPayServer/Plugins/Monetization/LinkGenerator.Monetization.cs
index 64d067b..8e37631 100644
--- a/BTCPayServer/Plugins/Monetization/LinkGenerator.Monetization.cs
+++ b/BTCPayServer/Plugins/Monetization/LinkGenerator.Monetization.cs
@@ -1,7 +1,5 @@
#nullable enable
using BTCPayServer.Abstractions;
-using BTCPayServer.Plugins.Emails;
-using BTCPayServer.Plugins.Emails.Controllers;
using BTCPayServer.Plugins.Monetization;
using BTCPayServer.Plugins.Monetization.Controllers;
using Microsoft.AspNetCore.Routing;
diff --git a/BTCPayServer/Plugins/Monetization/MonetizationEmailTransformer.cs b/BTCPayServer/Plugins/Monetization/MonetizationEmailTransformer.cs
index 466b057..307943a 100644
--- a/BTCPayServer/Plugins/Monetization/MonetizationEmailTransformer.cs
+++ b/BTCPayServer/Plugins/Monetization/MonetizationEmailTransformer.cs
@@ -1,7 +1,6 @@
using BTCPayServer.Abstractions;
using BTCPayServer.Plugins.Emails;
using BTCPayServer.Plugins.Emails.Views;
-using BTCPayServer.Plugins.Monetization.Controllers;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs b/BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs
index 94be587..dbaeb15 100644
--- a/BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs
+++ b/BTCPayServer/Plugins/Monetization/MonetizationHostedService.cs
@@ -1,6 +1,5 @@
#nullable enable
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
diff --git a/BTCPayServer/Plugins/Monetization/MonetizationLoginExtension.cs b/BTCPayServer/Plugins/Monetization/MonetizationLoginExtension.cs
index b786e9a..28655bd 100644
--- a/BTCPayServer/Plugins/Monetization/MonetizationLoginExtension.cs
+++ b/BTCPayServer/Plugins/Monetization/MonetizationLoginExtension.cs
@@ -1,10 +1,6 @@
#nullable enable
-using System;
-using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using BTCPayServer.Data.Subscriptions;
-using BTCPayServer.Plugins.Subscriptions;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
diff --git a/BTCPayServer/Plugins/Monetization/Views/MigrateUsersModalViewModel.cs b/BTCPayServer/Plugins/Monetization/Views/MigrateUsersModalViewModel.cs
index 3541c55..3e5b7ea 100644
--- a/BTCPayServer/Plugins/Monetization/Views/MigrateUsersModalViewModel.cs
+++ b/BTCPayServer/Plugins/Monetization/Views/MigrateUsersModalViewModel.cs
@@ -1,6 +1,4 @@
using System.Collections.Generic;
-using System.Linq;
-using BTCPayServer.Data.Subscriptions;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Plugins.Monetization.Views;
diff --git a/BTCPayServer/Plugins/Monetization/Views/MonetizationViewModel.cs b/BTCPayServer/Plugins/Monetization/Views/MonetizationViewModel.cs
index 47a0073..b471df6 100644
--- a/BTCPayServer/Plugins/Monetization/Views/MonetizationViewModel.cs
+++ b/BTCPayServer/Plugins/Monetization/Views/MonetizationViewModel.cs
@@ -1,10 +1,8 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
-using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Data.Subscriptions;
-using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Plugins.Monetization.Views;
diff --git a/BTCPayServer/Plugins/Monetization/Views/NavExtension.cshtml b/BTCPayServer/Plugins/Monetization/Views/NavExtension.cshtml
index 05549d4..e87e57f 100644
--- a/BTCPayServer/Plugins/Monetization/Views/NavExtension.cshtml
+++ b/BTCPayServer/Plugins/Monetization/Views/NavExtension.cshtml
@@ -1,5 +1,3 @@
-@using BTCPayServer.Client
-@using BTCPayServer.Views.Server
@model BTCPayServer.Components.MainNav.MainNavViewModel
<li class="nav-item nav-item-sub" permission="@Policies.CanModifyServerSettings">
diff --git a/BTCPayServer/Plugins/NFC/NFCController.cs b/BTCPayServer/Plugins/NFC/NFCController.cs
index debe78f..7d44967 100644
--- a/BTCPayServer/Plugins/NFC/NFCController.cs
+++ b/BTCPayServer/Plugins/NFC/NFCController.cs
@@ -6,7 +6,6 @@ using BTCPayServer.Client.Models;
using BTCPayServer.Data.Payouts.LightningLike;
using BTCPayServer.Lightning;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Stores;
diff --git a/BTCPayServer/Plugins/NFC/NFCPlugin.cs b/BTCPayServer/Plugins/NFC/NFCPlugin.cs
index a46a4fc..9e4bc2a 100644
--- a/BTCPayServer/Plugins/NFC/NFCPlugin.cs
+++ b/BTCPayServer/Plugins/NFC/NFCPlugin.cs
@@ -1,6 +1,4 @@
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Abstractions.Services;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Plugins.NFC
diff --git a/BTCPayServer/Plugins/PayButton/Controllers/UIPayButtonController.cs b/BTCPayServer/Plugins/PayButton/Controllers/UIPayButtonController.cs
index 800aad7..74c6bf3 100644
--- a/BTCPayServer/Plugins/PayButton/Controllers/UIPayButtonController.cs
+++ b/BTCPayServer/Plugins/PayButton/Controllers/UIPayButtonController.cs
@@ -9,7 +9,6 @@ using BTCPayServer.Plugins.PayButton.Models;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using StoreData = BTCPayServer.Data.StoreData;
diff --git a/BTCPayServer/Plugins/PayButton/Views/NavExtension.cshtml b/BTCPayServer/Plugins/PayButton/Views/NavExtension.cshtml
index f032955..c3d122f 100644
--- a/BTCPayServer/Plugins/PayButton/Views/NavExtension.cshtml
+++ b/BTCPayServer/Plugins/PayButton/Views/NavExtension.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Client
-@using BTCPayServer.Views.Stores
@model BTCPayServer.Components.MainNav.MainNavViewModel
@if (Model.Store != null)
diff --git a/BTCPayServer/Plugins/PluginBuilderClient.cs b/BTCPayServer/Plugins/PluginBuilderClient.cs
index bdda7da..a85ddcd 100644
--- a/BTCPayServer/Plugins/PluginBuilderClient.cs
+++ b/BTCPayServer/Plugins/PluginBuilderClient.cs
@@ -7,7 +7,6 @@ using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using static System.Net.WebRequestMethods;
namespace BTCPayServer.Plugins
{
diff --git a/BTCPayServer/Plugins/PluginExceptionHandler.cs b/BTCPayServer/Plugins/PluginExceptionHandler.cs
index 5aafd05..9613765 100644
--- a/BTCPayServer/Plugins/PluginExceptionHandler.cs
+++ b/BTCPayServer/Plugins/PluginExceptionHandler.cs
@@ -6,11 +6,8 @@ using System.Threading.Tasks;
using BTCPayServer.Configuration;
using BTCPayServer.Logging;
using Microsoft.AspNetCore.Diagnostics;
-using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Hosting.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
diff --git a/BTCPayServer/Plugins/PluginServiceCollection.cs b/BTCPayServer/Plugins/PluginServiceCollection.cs
index d8497ea..ea1da34 100644
--- a/BTCPayServer/Plugins/PluginServiceCollection.cs
+++ b/BTCPayServer/Plugins/PluginServiceCollection.cs
@@ -1,11 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
-using BTCPayServer.Configuration;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
-using NBitcoin;
-using NBXplorer;
namespace BTCPayServer.Plugins
{
diff --git a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
index 0c2ecc4..a2a019c 100644
--- a/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
+++ b/BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
-using System.Runtime.CompilerServices;
using System.Text;
using System.Text.Encodings.Web;
using System.Text.RegularExpressions;
@@ -32,7 +31,6 @@ using Ganss.Xss;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http.Extensions;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using NBitcoin;
diff --git a/BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs b/BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs
index 390722b..87b5873 100644
--- a/BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs
+++ b/BTCPayServer/Plugins/PointOfSale/Models/ViewPointOfSaleViewModel.cs
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using System.Linq;
using BTCPayServer.Client.Models;
using BTCPayServer.Models;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.Extensions.Localization;
namespace BTCPayServer.Plugins.PointOfSale.Models
{
diff --git a/BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs b/BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs
index 2ada14b..2a51ce3 100644
--- a/BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs
+++ b/BTCPayServer/Plugins/PointOfSale/PointOfSalePlugin.cs
@@ -4,9 +4,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Abstractions.Services;
using BTCPayServer.Client.Models;
using BTCPayServer.Configuration;
using BTCPayServer.Data;
diff --git a/BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml b/BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml
index d15fb67..d2c6a46 100644
--- a/BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml
+++ b/BTCPayServer/Plugins/PointOfSale/Views/Public/Static.cshtml
@@ -1,6 +1,5 @@
@using BTCPayServer.Client.Models
@using BTCPayServer.Services
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject DisplayFormatter DisplayFormatter
@model BTCPayServer.Plugins.PointOfSale.Models.ViewPointOfSaleViewModel
@{
diff --git a/BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml b/BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml
index 4d37367..6459c9c 100644
--- a/BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml
+++ b/BTCPayServer/Plugins/PointOfSale/Views/Public/VueLight.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services
-@using Newtonsoft.Json.Linq
@using BTCPayServer.Client
@using BTCPayServer.Client.Models
@inject DisplayFormatter DisplayFormatter
diff --git a/BTCPayServer/Plugins/PointOfSale/Views/UpdatePointOfSale.cshtml b/BTCPayServer/Plugins/PointOfSale/Views/UpdatePointOfSale.cshtml
index e23815b..420bba4 100644
--- a/BTCPayServer/Plugins/PointOfSale/Views/UpdatePointOfSale.cshtml
+++ b/BTCPayServer/Plugins/PointOfSale/Views/UpdatePointOfSale.cshtml
@@ -1,9 +1,6 @@
-@using BTCPayServer.Views.Apps
@using BTCPayServer.Client
@using BTCPayServer.Plugins.PointOfSale
@using BTCPayServer.Forms
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject FormDataService FormDataService
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
@model BTCPayServer.Plugins.PointOfSale.Models.UpdatePointOfSaleViewModel
diff --git a/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs b/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs
index 2f35394..fab51c6 100644
--- a/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs
+++ b/BTCPayServer/Plugins/Shopify/ShopifyApiClient.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
diff --git a/BTCPayServer/Plugins/Shopify/ShopifyExtensions.cs b/BTCPayServer/Plugins/Shopify/ShopifyExtensions.cs
index b527029..859db06 100644
--- a/BTCPayServer/Plugins/Shopify/ShopifyExtensions.cs
+++ b/BTCPayServer/Plugins/Shopify/ShopifyExtensions.cs
@@ -1,9 +1,5 @@
-using BTCPayServer.Abstractions.Contracts;
-using BTCPayServer.Abstractions.Services;
using BTCPayServer.Data;
using BTCPayServer.Plugins.Shopify.Models;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
using NBitcoin;
using NBXplorer;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs b/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs
index 30acd67..16ffacc 100644
--- a/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs
+++ b/BTCPayServer/Plugins/Shopify/ShopifyPlugin.cs
@@ -1,6 +1,4 @@
-using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Abstractions.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
diff --git a/BTCPayServer/Plugins/Shopify/Views/NavExtension.cshtml b/BTCPayServer/Plugins/Shopify/Views/NavExtension.cshtml
index 0fa0a8c..2889a46 100644
--- a/BTCPayServer/Plugins/Shopify/Views/NavExtension.cshtml
+++ b/BTCPayServer/Plugins/Shopify/Views/NavExtension.cshtml
@@ -1,6 +1,5 @@
@using BTCPayServer.Client
@using BTCPayServer.Plugins.Shopify
-@using BTCPayServer.Views.Stores
@model BTCPayServer.Components.MainNav.MainNavViewModel
@{
var store = Model.Store;
diff --git a/BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs b/BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
index 3afaeed..47d1ce1 100644
--- a/BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Controllers/GreenfieldOfferingController.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.Client;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Data.Subscriptions;
diff --git a/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.Cheating.cs b/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.Cheating.cs
index ee4c978..4f2d981 100644
--- a/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.Cheating.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.Cheating.cs
@@ -1,15 +1,8 @@
#nullable enable
-using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.Data;
using BTCPayServer.Data.Subscriptions;
-using BTCPayServer.Filters;
-using BTCPayServer.Plugins.Subscriptions;
using BTCPayServer.Views.UIStoreMembership;
-using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.cs b/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.cs
index d6aa2bb..29f31e5 100644
--- a/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Controllers/UIOfferingController.cs
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Abstractions.Models;
-using BTCPayServer.Client;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Data.Subscriptions;
diff --git a/BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriberPortalController.cs b/BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriberPortalController.cs
index 0ebbaaa..e8bac95 100644
--- a/BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriberPortalController.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriberPortalController.cs
@@ -12,7 +12,6 @@ using BTCPayServer.Data.Subscriptions;
using BTCPayServer.Models;
using BTCPayServer.Services;
using BTCPayServer.Views.UIStoreMembership;
-using Dapper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Plugins/Subscriptions/Views/NavExtension.cshtml b/BTCPayServer/Plugins/Subscriptions/Views/NavExtension.cshtml
index b176aa0..78de4aa 100644
--- a/BTCPayServer/Plugins/Subscriptions/Views/NavExtension.cshtml
+++ b/BTCPayServer/Plugins/Subscriptions/Views/NavExtension.cshtml
@@ -1,10 +1,5 @@
@using BTCPayServer.Client
-@using BTCPayServer.Components.MainNav
-@using BTCPayServer.Plugins.PointOfSale
@using BTCPayServer.Plugins.Subscriptions
-@using BTCPayServer.Services.Apps
-@using BTCPayServer.Views.Apps
-@using Microsoft.AspNetCore.Mvc.Razor
@model BTCPayServer.Components.MainNav.MainNavViewModel
@{
diff --git a/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/AddEditPlanViewModel.cs b/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/AddEditPlanViewModel.cs
index 9ba1947..b3c9a9f 100644
--- a/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/AddEditPlanViewModel.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/AddEditPlanViewModel.cs
@@ -1,9 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using BTCPayServer.Data;
using BTCPayServer.Data.Subscriptions;
-using Microsoft.AspNetCore.Mvc.Razor;
-using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Views.UIStoreMembership
{
diff --git a/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml b/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml
index a255ea2..6e8ad24 100644
--- a/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml
+++ b/BTCPayServer/Plugins/Subscriptions/Views/UIOffering/CreateOffering.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Plugins.Subscriptions
-@using BTCPayServer.Services
@model CreateOfferingViewModel
@{
diff --git a/BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutViewModel.cs b/BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutViewModel.cs
index 20d4047..16680bb 100644
--- a/BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutViewModel.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Views/UIPlanCheckout/PlanCheckoutViewModel.cs
@@ -1,5 +1,4 @@
-using BTCPayServer.Data;
-using BTCPayServer.Data.Subscriptions;
+using BTCPayServer.Data.Subscriptions;
using BTCPayServer.Models;
namespace BTCPayServer.Views.UIStoreMembership;
diff --git a/BTCPayServer/Plugins/Subscriptions/Views/UISubscriberPortal/SubscriberPortalViewModel.cs b/BTCPayServer/Plugins/Subscriptions/Views/UISubscriberPortal/SubscriberPortalViewModel.cs
index 129d24a..65338c8 100644
--- a/BTCPayServer/Plugins/Subscriptions/Views/UISubscriberPortal/SubscriberPortalViewModel.cs
+++ b/BTCPayServer/Plugins/Subscriptions/Views/UISubscriberPortal/SubscriberPortalViewModel.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using BTCPayServer.Data.Subscriptions;
using BTCPayServer.Models;
-using BTCPayServer.Plugins.Subscriptions;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
diff --git a/BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs b/BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs
index 5273219..4e3e760 100644
--- a/BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs
+++ b/BTCPayServer/Plugins/Translations/Controllers/UITranslationController.cs
@@ -1,10 +1,8 @@
using System;
using System.Data.Common;
using System.Linq;
-using System.Net.Http;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
-using BTCPayServer.Models.ServerViewModels;
using BTCPayServer.Plugins.Translations.Views;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Authorization;
diff --git a/BTCPayServer/Plugins/Translations/Views/CreateDictionaryViewModel.cs b/BTCPayServer/Plugins/Translations/Views/CreateDictionaryViewModel.cs
index b3c98fd..ff48755 100644
--- a/BTCPayServer/Plugins/Translations/Views/CreateDictionaryViewModel.cs
+++ b/BTCPayServer/Plugins/Translations/Views/CreateDictionaryViewModel.cs
@@ -1,7 +1,5 @@
-using System;
using System.ComponentModel.DataAnnotations;
using System.Linq;
-using BTCPayServer.Services;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Plugins.Translations.Views;
diff --git a/BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs b/BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs
index f20ec31..2cf60fd 100644
--- a/BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs
+++ b/BTCPayServer/Plugins/Webhooks/Controllers/UIStoreWebhooksController.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
-using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
diff --git a/BTCPayServer/Plugins/Webhooks/HostedServices/WebhookProviderHostedService.cs b/BTCPayServer/Plugins/Webhooks/HostedServices/WebhookProviderHostedService.cs
index ff81b0f..a5a9ef7 100644
--- a/BTCPayServer/Plugins/Webhooks/HostedServices/WebhookProviderHostedService.cs
+++ b/BTCPayServer/Plugins/Webhooks/HostedServices/WebhookProviderHostedService.cs
@@ -1,12 +1,10 @@
#nullable enable
using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.HostedServices;
-using BTCPayServer.Plugins.Emails;
using BTCPayServer.Plugins.Emails.HostedServices;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Plugins/Webhooks/WebhookSender.cs b/BTCPayServer/Plugins/Webhooks/WebhookSender.cs
index 02badf7..779636b 100644
--- a/BTCPayServer/Plugins/Webhooks/WebhookSender.cs
+++ b/BTCPayServer/Plugins/Webhooks/WebhookSender.cs
@@ -1,6 +1,5 @@
#nullable enable
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
diff --git a/BTCPayServer/Plugins/Webhooks/WebhookTriggerProvider.cs b/BTCPayServer/Plugins/Webhooks/WebhookTriggerProvider.cs
index 7de4880..c02abed 100644
--- a/BTCPayServer/Plugins/Webhooks/WebhookTriggerProvider.cs
+++ b/BTCPayServer/Plugins/Webhooks/WebhookTriggerProvider.cs
@@ -1,8 +1,6 @@
#nullable enable
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
-using BTCPayServer.HostedServices;
-using BTCPayServer.Plugins.Emails;
using BTCPayServer.Plugins.Emails.HostedServices;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Program.cs b/BTCPayServer/Program.cs
index df4a019..d80a689 100644
--- a/BTCPayServer/Program.cs
+++ b/BTCPayServer/Program.cs
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Linq;
-using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
diff --git a/BTCPayServer/Security/GreenField/GreenfieldAuthenticationHandler.cs b/BTCPayServer/Security/GreenField/GreenfieldAuthenticationHandler.cs
index 2a0b1f4..5c500ca 100644
--- a/BTCPayServer/Security/GreenField/GreenfieldAuthenticationHandler.cs
+++ b/BTCPayServer/Security/GreenField/GreenfieldAuthenticationHandler.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System.Globalization;
using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
diff --git a/BTCPayServer/Security/SetContextFilter.cs b/BTCPayServer/Security/SetContextFilter.cs
index 8098668..b4ec842 100644
--- a/BTCPayServer/Security/SetContextFilter.cs
+++ b/BTCPayServer/Security/SetContextFilter.cs
@@ -7,7 +7,6 @@ using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.PaymentRequests;
using BTCPayServer.Services.Stores;
-using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.Filters;
namespace BTCPayServer.Security;
diff --git a/BTCPayServer/Services/Apps/AppHub.cs b/BTCPayServer/Services/Apps/AppHub.cs
index aa5b4b4..60e8853 100644
--- a/BTCPayServer/Services/Apps/AppHub.cs
+++ b/BTCPayServer/Services/Apps/AppHub.cs
@@ -1,8 +1,6 @@
using System;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Extensions;
-using BTCPayServer.Controllers;
-using BTCPayServer.Models.AppViewModels;
using BTCPayServer.Plugins.Crowdfund.Controllers;
using BTCPayServer.Plugins.Crowdfund.Models;
using Microsoft.AspNetCore.Builder;
diff --git a/BTCPayServer/Services/Apps/CrowdfundSettings.cs b/BTCPayServer/Services/Apps/CrowdfundSettings.cs
index ff2dce2..c84dbbc 100644
--- a/BTCPayServer/Services/Apps/CrowdfundSettings.cs
+++ b/BTCPayServer/Services/Apps/CrowdfundSettings.cs
@@ -1,8 +1,6 @@
using System;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
-using System.Globalization;
-using System.Linq;
namespace BTCPayServer.Services.Apps
{
diff --git a/BTCPayServer/Services/Attachment.cs b/BTCPayServer/Services/Attachment.cs
index 6035ed1..ae58ad6 100644
--- a/BTCPayServer/Services/Attachment.cs
+++ b/BTCPayServer/Services/Attachment.cs
@@ -1,8 +1,6 @@
#nullable enable
using System.Collections.Generic;
-using BTCPayServer.Client.Models;
using BTCPayServer.Data;
-using BTCPayServer.Services.Labels;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/BTCPayNetworkJsonSerializerSettings.cs b/BTCPayServer/Services/BTCPayNetworkJsonSerializerSettings.cs
index 34233cb..f608472 100644
--- a/BTCPayServer/Services/BTCPayNetworkJsonSerializerSettings.cs
+++ b/BTCPayServer/Services/BTCPayNetworkJsonSerializerSettings.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Payouts;
-using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/BTCPayServerEnvironment.cs b/BTCPayServer/Services/BTCPayServerEnvironment.cs
index 9f55b38..7623348 100644
--- a/BTCPayServer/Services/BTCPayServerEnvironment.cs
+++ b/BTCPayServer/Services/BTCPayServerEnvironment.cs
@@ -1,14 +1,12 @@
using System;
using System.Globalization;
using System.Linq;
-using System.Net.Http;
using System.Reflection;
using System.Text;
using BTCPayServer.Configuration;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Options;
using NBitcoin;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/BTCPayServerSecurityStampValidator.cs b/BTCPayServer/Services/BTCPayServerSecurityStampValidator.cs
index ffdc080..0c9121b 100644
--- a/BTCPayServer/Services/BTCPayServerSecurityStampValidator.cs
+++ b/BTCPayServer/Services/BTCPayServerSecurityStampValidator.cs
@@ -1,11 +1,8 @@
#nullable enable
using System;
using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.Security.Claims;
using System.Threading.Tasks;
using BTCPayServer.Data;
-using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
diff --git a/BTCPayServer/Services/CallbackGenerator.cs b/BTCPayServer/Services/CallbackGenerator.cs
index a0ec6f0..c10287f 100644
--- a/BTCPayServer/Services/CallbackGenerator.cs
+++ b/BTCPayServer/Services/CallbackGenerator.cs
@@ -1,20 +1,14 @@
#nullable enable
using System;
-using System.Reflection.Emit;
using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Abstractions.Extensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Routing;
-using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Mvc;
-using NBitcoin.Altcoins.ArgoneumInternals;
using BTCPayServer.Controllers;
-using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Http.Extensions;
using NBitcoin.DataEncoders;
-using System.Runtime.CompilerServices;
using BTCPayServer.Abstractions;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/DefaultTransactionLinkProvider.cs b/BTCPayServer/Services/DefaultTransactionLinkProvider.cs
index d003468..5cd8a8b 100644
--- a/BTCPayServer/Services/DefaultTransactionLinkProvider.cs
+++ b/BTCPayServer/Services/DefaultTransactionLinkProvider.cs
@@ -1,5 +1,4 @@
#nullable enable
-using NBitcoin;
using System.Globalization;
using System.Linq;
diff --git a/BTCPayServer/Services/DelayedTaskScheduler.cs b/BTCPayServer/Services/DelayedTaskScheduler.cs
index 84e619d..5b01fdb 100644
--- a/BTCPayServer/Services/DelayedTaskScheduler.cs
+++ b/BTCPayServer/Services/DelayedTaskScheduler.cs
@@ -1,10 +1,8 @@
#nullable enable
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading;
-using Amazon.Runtime.Internal.Util;
using Microsoft.Extensions.Logging;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/Fees/FallbackFeeProvider.cs b/BTCPayServer/Services/Fees/FallbackFeeProvider.cs
index 186e0ff..9ebaa00 100644
--- a/BTCPayServer/Services/Fees/FallbackFeeProvider.cs
+++ b/BTCPayServer/Services/Fees/FallbackFeeProvider.cs
@@ -1,9 +1,6 @@
#nullable enable
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading.Tasks;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
using NBitcoin;
namespace BTCPayServer.Services.Fees
diff --git a/BTCPayServer/Services/Fees/FeeProviderFactory.cs b/BTCPayServer/Services/Fees/FeeProviderFactory.cs
index c399655..7e70c14 100644
--- a/BTCPayServer/Services/Fees/FeeProviderFactory.cs
+++ b/BTCPayServer/Services/Fees/FeeProviderFactory.cs
@@ -1,12 +1,10 @@
using System;
-using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.HostedServices;
-using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
diff --git a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs
index 2299ca5..67e1aa9 100644
--- a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs
+++ b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs
@@ -2,7 +2,6 @@
using System.Threading.Tasks;
using NBitcoin;
using NBXplorer;
-using NBXplorer.Models;
namespace BTCPayServer.Services.Fees
{
diff --git a/BTCPayServer/Services/ISettingsAccessor.cs b/BTCPayServer/Services/ISettingsAccessor.cs
index aac917e..794656d 100644
--- a/BTCPayServer/Services/ISettingsAccessor.cs
+++ b/BTCPayServer/Services/ISettingsAccessor.cs
@@ -1,10 +1,5 @@
#nullable enable
using System;
-using System.Threading;
-using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Contracts;
-using BTCPayServer.Events;
-using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
namespace BTCPayServer.Services
diff --git a/BTCPayServer/Services/InvoiceActivator.cs b/BTCPayServer/Services/InvoiceActivator.cs
index 5b5df86..ab33e3b 100644
--- a/BTCPayServer/Services/InvoiceActivator.cs
+++ b/BTCPayServer/Services/InvoiceActivator.cs
@@ -1,16 +1,12 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Logging;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Stores;
-using NBitcoin;
-using static BTCPayServer.Client.Models.InvoicePaymentMethodDataModel;
namespace BTCPayServer.Services
{
diff --git a/BTCPayServer/Services/Invoices/InvoiceEntity.cs b/BTCPayServer/Services/Invoices/InvoiceEntity.cs
index 378c610..7cc12ac 100644
--- a/BTCPayServer/Services/Invoices/InvoiceEntity.cs
+++ b/BTCPayServer/Services/Invoices/InvoiceEntity.cs
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
using System.Globalization;
using System.Linq;
-using System.Text;
using BTCPayServer.Abstractions;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Client.Models;
@@ -12,7 +10,6 @@ using BTCPayServer.JsonConverters;
using BTCPayServer.Models;
using BTCPayServer.Payments;
using BTCPayServer.Payments.Bitcoin;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Rating;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Mvc;
diff --git a/BTCPayServer/Services/Invoices/InvoiceRepository.cs b/BTCPayServer/Services/Invoices/InvoiceRepository.cs
index c3b790e..b2432bb 100644
--- a/BTCPayServer/Services/Invoices/InvoiceRepository.cs
+++ b/BTCPayServer/Services/Invoices/InvoiceRepository.cs
@@ -10,7 +10,6 @@ using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Logging;
-using BTCPayServer.Models.InvoicingModels;
using BTCPayServer.Payments;
using Dapper;
using Microsoft.EntityFrameworkCore;
diff --git a/BTCPayServer/Services/Invoices/PaymentMethodHandlerDictionary.cs b/BTCPayServer/Services/Invoices/PaymentMethodHandlerDictionary.cs
index f16248a..30ebb6e 100644
--- a/BTCPayServer/Services/Invoices/PaymentMethodHandlerDictionary.cs
+++ b/BTCPayServer/Services/Invoices/PaymentMethodHandlerDictionary.cs
@@ -1,11 +1,6 @@
#nullable enable
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Invoices
diff --git a/BTCPayServer/Services/Invoices/PaymentService.cs b/BTCPayServer/Services/Invoices/PaymentService.cs
index e793489..c230a83 100644
--- a/BTCPayServer/Services/Invoices/PaymentService.cs
+++ b/BTCPayServer/Services/Invoices/PaymentService.cs
@@ -1,16 +1,10 @@
-using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
using Microsoft.EntityFrameworkCore;
-using NBitcoin;
-using NBitpayClient;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Invoices
{
diff --git a/BTCPayServer/Services/Invoices/PosReceiptData.cs b/BTCPayServer/Services/Invoices/PosReceiptData.cs
index e9c2eb3..9d63186 100644
--- a/BTCPayServer/Services/Invoices/PosReceiptData.cs
+++ b/BTCPayServer/Services/Invoices/PosReceiptData.cs
@@ -3,7 +3,6 @@ using System.Linq;
using BTCPayServer.Client.Models;
using BTCPayServer.Plugins.PointOfSale;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Invoices;
diff --git a/BTCPayServer/Services/LanguageService.cs b/BTCPayServer/Services/LanguageService.cs
index 03aa036..f13c1f3 100644
--- a/BTCPayServer/Services/LanguageService.cs
+++ b/BTCPayServer/Services/LanguageService.cs
@@ -4,14 +4,12 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
-using BTCPayServer.Client.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Serialization;
namespace BTCPayServer.Services
{
diff --git a/BTCPayServer/Services/LightningHistogramService.cs b/BTCPayServer/Services/LightningHistogramService.cs
index ceff90a..e876974 100644
--- a/BTCPayServer/Services/LightningHistogramService.cs
+++ b/BTCPayServer/Services/LightningHistogramService.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
diff --git a/BTCPayServer/Services/NBXplorerConnectionFactory.cs b/BTCPayServer/Services/NBXplorerConnectionFactory.cs
index 6156b85..7697979 100644
--- a/BTCPayServer/Services/NBXplorerConnectionFactory.cs
+++ b/BTCPayServer/Services/NBXplorerConnectionFactory.cs
@@ -4,7 +4,6 @@ using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Configuration;
using BTCPayServer.Logging;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
diff --git a/BTCPayServer/Services/PoliciesSettings.cs b/BTCPayServer/Services/PoliciesSettings.cs
index 4d6a0d7..cf25e34 100644
--- a/BTCPayServer/Services/PoliciesSettings.cs
+++ b/BTCPayServer/Services/PoliciesSettings.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
-using BTCPayServer.Data;
using BTCPayServer.JsonConverters;
using BTCPayServer.Payments;
using BTCPayServer.Validation;
diff --git a/BTCPayServer/Services/Reporting/InvoicesReportProvider.cs b/BTCPayServer/Services/Reporting/InvoicesReportProvider.cs
index 6370618..f0255a2 100644
--- a/BTCPayServer/Services/Reporting/InvoicesReportProvider.cs
+++ b/BTCPayServer/Services/Reporting/InvoicesReportProvider.cs
@@ -9,7 +9,6 @@ using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Rating;
using BTCPayServer.Services.Invoices;
-using BTCPayServer.Services.Rates;
using BTCPayServer.Services.Stores;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/Services/Reporting/PaymentsReportProvider.cs b/BTCPayServer/Services/Reporting/PaymentsReportProvider.cs
index 8de9b83..9db8046 100644
--- a/BTCPayServer/Services/Reporting/PaymentsReportProvider.cs
+++ b/BTCPayServer/Services/Reporting/PaymentsReportProvider.cs
@@ -1,15 +1,10 @@
-using System;
using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Payments;
using BTCPayServer.Payments.Bitcoin;
using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services.Invoices;
-using Dapper;
-using Microsoft.EntityFrameworkCore;
-using static BTCPayServer.Client.Models.InvoicePaymentMethodDataModel;
namespace BTCPayServer.Services.Reporting;
diff --git a/BTCPayServer/Services/Reporting/PayoutsReportProvider.cs b/BTCPayServer/Services/Reporting/PayoutsReportProvider.cs
index c4f3da1..9a495c3 100644
--- a/BTCPayServer/Services/Reporting/PayoutsReportProvider.cs
+++ b/BTCPayServer/Services/Reporting/PayoutsReportProvider.cs
@@ -7,11 +7,7 @@ using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Data.Payouts.LightningLike;
using BTCPayServer.HostedServices;
-using BTCPayServer.Payments;
-using BTCPayServer.Payments.Bitcoin;
-using BTCPayServer.Payments.Lightning;
using BTCPayServer.Payouts;
-using BTCPayServer.Services.Invoices;
namespace BTCPayServer.Services.Reporting;
diff --git a/BTCPayServer/Services/Socks5HttpClientHandler.cs b/BTCPayServer/Services/Socks5HttpClientHandler.cs
index 841294c..eb65a59 100644
--- a/BTCPayServer/Services/Socks5HttpClientHandler.cs
+++ b/BTCPayServer/Services/Socks5HttpClientHandler.cs
@@ -1,7 +1,6 @@
using System.Net;
using System.Net.Http;
using BTCPayServer.Configuration;
-using BTCPayServer.HostedServices;
namespace BTCPayServer.Services
{
diff --git a/BTCPayServer/Services/ThemesSettings.cs b/BTCPayServer/Services/ThemesSettings.cs
index c6d3f99..7b55991 100644
--- a/BTCPayServer/Services/ThemesSettings.cs
+++ b/BTCPayServer/Services/ThemesSettings.cs
@@ -1,4 +1,3 @@
-using System;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
diff --git a/BTCPayServer/Services/TransactionLinkProvider.cs b/BTCPayServer/Services/TransactionLinkProvider.cs
index 330eb41..7d1491c 100644
--- a/BTCPayServer/Services/TransactionLinkProvider.cs
+++ b/BTCPayServer/Services/TransactionLinkProvider.cs
@@ -1,6 +1,4 @@
#nullable enable
-using BTCPayServer;
-
namespace BTCPayServer.Services;
public abstract class TransactionLinkProvider
{
diff --git a/BTCPayServer/Services/TransactionLinkProviders.cs b/BTCPayServer/Services/TransactionLinkProviders.cs
index 1fc1b78..88058cd 100644
--- a/BTCPayServer/Services/TransactionLinkProviders.cs
+++ b/BTCPayServer/Services/TransactionLinkProviders.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System;
using BTCPayServer.Payments;
using System.Threading.Tasks;
-using BTCPayServer.Abstractions.Contracts;
using System.Linq;
namespace BTCPayServer.Services;
diff --git a/BTCPayServer/Services/UriResolver.cs b/BTCPayServer/Services/UriResolver.cs
index 7d57c1b..1d0ba2c 100644
--- a/BTCPayServer/Services/UriResolver.cs
+++ b/BTCPayServer/Services/UriResolver.cs
@@ -1,7 +1,5 @@
#nullable enable
using System;
-using System.Diagnostics.CodeAnalysis;
-using System.Security.AccessControl;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
diff --git a/BTCPayServer/Services/UserService.cs b/BTCPayServer/Services/UserService.cs
index 54fa253..f6ec7cc 100644
--- a/BTCPayServer/Services/UserService.cs
+++ b/BTCPayServer/Services/UserService.cs
@@ -1,7 +1,6 @@
#nullable enable
using System;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions;
diff --git a/BTCPayServer/Services/WalletFileParsing/BSMSWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/BSMSWalletFileParser.cs
index 4e7f77e..189f713 100644
--- a/BTCPayServer/Services/WalletFileParsing/BSMSWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/BSMSWalletFileParser.cs
@@ -2,12 +2,8 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using BTCPayServer;
using NBitcoin;
-using NBXplorer;
using NBXplorer.DerivationStrategy;
-using AccountKeySettings = BTCPayServer.AccountKeySettings;
-using BTCPayNetwork = BTCPayServer.BTCPayNetwork;
namespace BTCPayServer.Services.WalletFileParsing;
public class BSMSWalletFileParser : IWalletFileParser
diff --git a/BTCPayServer/Services/WalletFileParsing/ElectrumWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/ElectrumWalletFileParser.cs
index 885f85f..3ba43e1 100644
--- a/BTCPayServer/Services/WalletFileParsing/ElectrumWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/ElectrumWalletFileParser.cs
@@ -1,5 +1,4 @@
#nullable enable
-using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using NBitcoin;
diff --git a/BTCPayServer/Services/WalletFileParsing/IWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/IWalletFileParser.cs
index 1b45387..fd10325 100644
--- a/BTCPayServer/Services/WalletFileParsing/IWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/IWalletFileParser.cs
@@ -1,6 +1,6 @@
#nullable enable
using System.Diagnostics.CodeAnalysis;
-using BTCPayServer;
+
namespace BTCPayServer.Services.WalletFileParsing;
public interface IWalletFileParser
{
diff --git a/BTCPayServer/Services/WalletFileParsing/OutputDescriptorJsonWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/OutputDescriptorJsonWalletFileParser.cs
index 1d337c3..1942bd3 100644
--- a/BTCPayServer/Services/WalletFileParsing/OutputDescriptorJsonWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/OutputDescriptorJsonWalletFileParser.cs
@@ -1,9 +1,7 @@
#nullable enable
-using System;
using System.Diagnostics.CodeAnalysis;
-using BTCPayServer;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
+
namespace BTCPayServer.Services.WalletFileParsing;
public class OutputDescriptorJsonWalletFileParser : IWalletFileParser
{
diff --git a/BTCPayServer/Services/WalletFileParsing/OutputDescriptorWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/OutputDescriptorWalletFileParser.cs
index 932a332..17bf025 100644
--- a/BTCPayServer/Services/WalletFileParsing/OutputDescriptorWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/OutputDescriptorWalletFileParser.cs
@@ -1,8 +1,7 @@
#nullable enable
using System;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
-using BTCPayServer;
+
namespace BTCPayServer.Services.WalletFileParsing;
public class OutputDescriptorWalletFileParser : IWalletFileParser
{
diff --git a/BTCPayServer/Services/WalletFileParsing/SpecterWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/SpecterWalletFileParser.cs
index aea6f8c..5cb8bfa 100644
--- a/BTCPayServer/Services/WalletFileParsing/SpecterWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/SpecterWalletFileParser.cs
@@ -1,9 +1,7 @@
#nullable enable
-using System;
using System.Diagnostics.CodeAnalysis;
-using BTCPayServer;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
+
namespace BTCPayServer.Services.WalletFileParsing;
public class SpecterWalletFileParser : IWalletFileParser
{
diff --git a/BTCPayServer/Services/WalletFileParsing/WasabiWalletFileParser.cs b/BTCPayServer/Services/WalletFileParsing/WasabiWalletFileParser.cs
index 34780c4..548309f 100644
--- a/BTCPayServer/Services/WalletFileParsing/WasabiWalletFileParser.cs
+++ b/BTCPayServer/Services/WalletFileParsing/WasabiWalletFileParser.cs
@@ -1,12 +1,10 @@
#nullable enable
-using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using BTCPayServer;
using NBitcoin;
using NBitcoin.DataEncoders;
using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
+
namespace BTCPayServer.Services.WalletFileParsing;
public class WasabiWalletFileParser : IWalletFileParser
{
diff --git a/BTCPayServer/Services/WalletRepository.cs b/BTCPayServer/Services/WalletRepository.cs
index 56b17f8..e3b90cb 100644
--- a/BTCPayServer/Services/WalletRepository.cs
+++ b/BTCPayServer/Services/WalletRepository.cs
@@ -8,17 +8,14 @@ using System.Threading.Tasks;
using BTCPayServer.Abstractions.Extensions;
using BTCPayServer.Data;
using BTCPayServer.Models.WalletViewModels;
-using BTCPayServer.Payments;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Wallets;
using Dapper;
using Microsoft.EntityFrameworkCore;
using NBitcoin;
-using NBXplorer.DerivationStrategy;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Npgsql;
-using Org.BouncyCastle.Utilities;
namespace BTCPayServer.Services
{
diff --git a/BTCPayServer/Services/Wallets/BTCPayWallet.cs b/BTCPayServer/Services/Wallets/BTCPayWallet.cs
index feefd80..c7e9d85 100644
--- a/BTCPayServer/Services/Wallets/BTCPayWallet.cs
+++ b/BTCPayServer/Services/Wallets/BTCPayWallet.cs
@@ -8,7 +8,6 @@ using BTCPayServer.Data;
using BTCPayServer.HostedServices;
using BTCPayServer.Logging;
using Dapper;
-using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
@@ -18,8 +17,6 @@ using NBXplorer;
using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
using Newtonsoft.Json.Linq;
-using static BTCPayServer.Services.TransactionLinkProviders;
-using static NBitcoin.Protocol.Behaviors.ChainBehavior;
namespace BTCPayServer.Services.Wallets
{
diff --git a/BTCPayServer/Services/Wallets/Export/TransactionsExport.cs b/BTCPayServer/Services/Wallets/Export/TransactionsExport.cs
index 3432c3b..fb18cab 100644
--- a/BTCPayServer/Services/Wallets/Export/TransactionsExport.cs
+++ b/BTCPayServer/Services/Wallets/Export/TransactionsExport.cs
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
-using System.Text;
using BTCPayServer.Data;
using CsvHelper.Configuration;
using CsvHelper.Configuration.Attributes;
diff --git a/BTCPayServer/Services/Wallets/WalletReceiveService.cs b/BTCPayServer/Services/Wallets/WalletReceiveService.cs
index ec0c0d2..7fb4cfd 100644
--- a/BTCPayServer/Services/Wallets/WalletReceiveService.cs
+++ b/BTCPayServer/Services/Wallets/WalletReceiveService.cs
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using BTCPayServer.Data;
using BTCPayServer.Events;
using BTCPayServer.Payments;
using BTCPayServer.Services.Invoices;
@@ -14,7 +13,6 @@ using NBitcoin;
using NBXplorer;
using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
-using Newtonsoft.Json.Linq;
namespace BTCPayServer.Services.Wallets
{
diff --git a/BTCPayServer/Storage/Models/StorageSettings.cs b/BTCPayServer/Storage/Models/StorageSettings.cs
index 18cf024..00e2118 100644
--- a/BTCPayServer/Storage/Models/StorageSettings.cs
+++ b/BTCPayServer/Storage/Models/StorageSettings.cs
@@ -1,4 +1,3 @@
-using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/BTCPayServer/TagHelpers/TranslateTagHelper.cs b/BTCPayServer/TagHelpers/TranslateTagHelper.cs
index 60c295d..795b1ca 100644
--- a/BTCPayServer/TagHelpers/TranslateTagHelper.cs
+++ b/BTCPayServer/TagHelpers/TranslateTagHelper.cs
@@ -1,14 +1,8 @@
-using System.Globalization;
-using System.Runtime.CompilerServices;
using System.Threading.Tasks;
-using AngleSharp.Html;
using BTCPayServer.Abstractions.Services;
-using Microsoft.AspNetCore.Html;
-using Microsoft.AspNetCore.Mvc.Localization;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Localization;
-using Microsoft.Extensions.Logging;
namespace BTCPayServer.TagHelpers
{
diff --git a/BTCPayServer/Validation/MailboxAddressValidator.cs b/BTCPayServer/Validation/MailboxAddressValidator.cs
index c7077bf..c74a030 100644
--- a/BTCPayServer/Validation/MailboxAddressValidator.cs
+++ b/BTCPayServer/Validation/MailboxAddressValidator.cs
@@ -1,8 +1,6 @@
#nullable enable
using System;
-using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
-using System.Text.RegularExpressions;
using MimeKit;
namespace BTCPayServer
diff --git a/BTCPayServer/VaultClient.cs b/BTCPayServer/VaultClient.cs
index 59afabc..6888333 100644
--- a/BTCPayServer/VaultClient.cs
+++ b/BTCPayServer/VaultClient.cs
@@ -1,6 +1,5 @@
#nullable enable
using System;
-using System.Linq;
using System.Text.Json.Nodes;
using System.Threading;
using System.Threading.Tasks;
diff --git a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml
index 31d6e7d..c367ccc 100644
--- a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml
+++ b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckout.cshtml
@@ -1,6 +1,4 @@
@using BTCPayServer.BIP78.Sender
-@using BTCPayServer.Components.TruncateCenter
-@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Payments.Bitcoin
@model BTCPayServer.Models.InvoicingModels.CheckoutModel
diff --git a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml
index 6b8db37..4a6569a 100644
--- a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml
+++ b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml
@@ -1,5 +1,3 @@
-@using System.Globalization
-@using BTCPayServer.Payments
@using BTCPayServer.Payments.Bitcoin
@using BTCPayServer.Services
@using BTCPayServer.Services.Invoices
diff --git a/BTCPayServer/Views/Shared/Forms/FieldSetElement.cshtml b/BTCPayServer/Views/Shared/Forms/FieldSetElement.cshtml
index 875aead..7dbcadd 100644
--- a/BTCPayServer/Views/Shared/Forms/FieldSetElement.cshtml
+++ b/BTCPayServer/Views/Shared/Forms/FieldSetElement.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Forms
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject FormComponentProviders FormComponentProviders
@model BTCPayServer.Abstractions.Form.Field
@if (!Model.Constant)
diff --git a/BTCPayServer/Views/Shared/LayoutHead.cshtml b/BTCPayServer/Views/Shared/LayoutHead.cshtml
index 35d0c8b..179f8cd 100644
--- a/BTCPayServer/Views/Shared/LayoutHead.cshtml
+++ b/BTCPayServer/Views/Shared/LayoutHead.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject PoliciesSettings PoliciesSettings
@inject UriResolver UriResolver
@{
diff --git a/BTCPayServer/Views/Shared/LayoutHeadStoreBranding.cshtml b/BTCPayServer/Views/Shared/LayoutHeadStoreBranding.cshtml
index 6d1b906..11d3c77 100644
--- a/BTCPayServer/Views/Shared/LayoutHeadStoreBranding.cshtml
+++ b/BTCPayServer/Views/Shared/LayoutHeadStoreBranding.cshtml
@@ -1,5 +1,4 @@
@using System.Drawing
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model StoreBrandingViewModel
@if (!string.IsNullOrEmpty(Model.BrandColor))
{
diff --git a/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
index 11b04c3..1bd8aa0 100644
--- a/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
+++ b/BTCPayServer/Views/Shared/Lightning/ViewLightningLikePaymentData.cshtml
@@ -1,8 +1,6 @@
@using BTCPayServer.Payments
@using BTCPayServer.Payments.Lightning
@using BTCPayServer.Services
-@using BTCPayServer.Components.TruncateCenter
-@using BTCPayServer.Lightning
@using BTCPayServer.Services.Invoices
@inject DisplayFormatter DisplayFormatter
@inject PaymentMethodHandlerDictionary handlers
diff --git a/BTCPayServer/Views/Shared/PosData.cshtml b/BTCPayServer/Views/Shared/PosData.cshtml
index c820de5..6a0123e 100644
--- a/BTCPayServer/Views/Shared/PosData.cshtml
+++ b/BTCPayServer/Views/Shared/PosData.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services.Invoices
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model (Dictionary<string, object> Items, int Level)
@if (Model.Items.Any())
diff --git a/BTCPayServer/Views/Shared/_Form.cshtml b/BTCPayServer/Views/Shared/_Form.cshtml
index e470117..299c683 100644
--- a/BTCPayServer/Views/Shared/_Form.cshtml
+++ b/BTCPayServer/Views/Shared/_Form.cshtml
@@ -1,4 +1,3 @@
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Forms
@model BTCPayServer.Abstractions.Form.Form
@inject FormComponentProviders FormComponentProviders
diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml
index 1cd11c0..f3c435d 100644
--- a/BTCPayServer/Views/Shared/_Layout.cshtml
+++ b/BTCPayServer/Views/Shared/_Layout.cshtml
@@ -1,5 +1,3 @@
-@using BTCPayServer.Components.StoreSelector
-@using BTCPayServer.Components.MainNav
@inject Microsoft.AspNetCore.Http.IHttpContextAccessor _context;
@inject BTCPayServer.Services.BTCPayServerEnvironment _env
@inject UserManager<ApplicationUser> _userManager
diff --git a/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml b/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml
index 206ee61..359d954 100644
--- a/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml
+++ b/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services
-@using BTCPayServer.Components.MainLogo
@using System.Text
@inject SettingsRepository SettingsRepository
@{
diff --git a/BTCPayServer/Views/UIForms/FormsList.cshtml b/BTCPayServer/Views/UIForms/FormsList.cshtml
index 50d1c3d..a05f9e3 100644
--- a/BTCPayServer/Views/UIForms/FormsList.cshtml
+++ b/BTCPayServer/Views/UIForms/FormsList.cshtml
@@ -1,4 +1,3 @@
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Client
@model List<BTCPayServer.Data.FormData>
@{
diff --git a/BTCPayServer/Views/UIForms/Modify.cshtml b/BTCPayServer/Views/UIForms/Modify.cshtml
index 1f55a41..cf89e77 100644
--- a/BTCPayServer/Views/UIForms/Modify.cshtml
+++ b/BTCPayServer/Views/UIForms/Modify.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Forms
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
@model BTCPayServer.Forms.ModifyForm
@{
diff --git a/BTCPayServer/Views/UIInvoice/Checkout.cshtml b/BTCPayServer/Views/UIInvoice/Checkout.cshtml
index 2fae202..3791891 100644
--- a/BTCPayServer/Views/UIInvoice/Checkout.cshtml
+++ b/BTCPayServer/Views/UIInvoice/Checkout.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services
-@using BTCPayServer.Abstractions.Contracts
@inject LanguageService LangService
@inject BTCPayServerEnvironment Env
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
diff --git a/BTCPayServer/Views/UIInvoice/CreateInvoice.cshtml b/BTCPayServer/Views/UIInvoice/CreateInvoice.cshtml
index 2604c96..b722dc8 100644
--- a/BTCPayServer/Views/UIInvoice/CreateInvoice.cshtml
+++ b/BTCPayServer/Views/UIInvoice/CreateInvoice.cshtml
@@ -1,7 +1,4 @@
@model BTCPayServer.Models.InvoicingModels.CreateInvoiceModel
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
-@using BTCPayServer.Abstractions.TagHelpers
@{
ViewData.SetLayoutModel(new("Invoices", StringLocalizer["Create Invoices"]));
}
diff --git a/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml b/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml
index 175fd0b..0526433 100644
--- a/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml
+++ b/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml
@@ -1,7 +1,6 @@
@model BTCPayServer.Models.InvoicingModels.InvoiceReceiptViewModel
@using BTCPayServer.Client
@using BTCPayServer.Client.Models
-@using BTCPayServer.Components.QRCode
@using BTCPayServer.Services
@inject BTCPayServerEnvironment Env
@inject DisplayFormatter DisplayFormatter
diff --git a/BTCPayServer/Views/UIInvoice/InvoiceReceiptPrint.cshtml b/BTCPayServer/Views/UIInvoice/InvoiceReceiptPrint.cshtml
index 6c1a20d..452dd9f 100644
--- a/BTCPayServer/Views/UIInvoice/InvoiceReceiptPrint.cshtml
+++ b/BTCPayServer/Views/UIInvoice/InvoiceReceiptPrint.cshtml
@@ -1,6 +1,5 @@
@model BTCPayServer.Models.InvoicingModels.InvoiceReceiptViewModel
@using BTCPayServer.Client.Models
-@using BTCPayServer.Components.QRCode
@using BTCPayServer.Services
@inject DisplayFormatter DisplayFormatter
@{
diff --git a/BTCPayServer/Views/UIInvoice/ListInvoices.cshtml b/BTCPayServer/Views/UIInvoice/ListInvoices.cshtml
index bf93996..5bbe79c 100644
--- a/BTCPayServer/Views/UIInvoice/ListInvoices.cshtml
+++ b/BTCPayServer/Views/UIInvoice/ListInvoices.cshtml
@@ -1,7 +1,5 @@
@using BTCPayServer.Client
-@using BTCPayServer.Client.Models
@using BTCPayServer.Services
-@using SetPasswordViewModel = BTCPayServer.Models.ManageViewModels.SetPasswordViewModel
@inject DisplayFormatter DisplayFormatter
@model InvoicesModel
@{
diff --git a/BTCPayServer/Views/UILNURL/EditLightningAddress.cshtml b/BTCPayServer/Views/UILNURL/EditLightningAddress.cshtml
index 78304d4..dff1b5e 100644
--- a/BTCPayServer/Views/UILNURL/EditLightningAddress.cshtml
+++ b/BTCPayServer/Views/UILNURL/EditLightningAddress.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Views.Stores
@model UILNURLController.EditLightningAddressVM
@{
ViewData.SetLayoutModel(new LayoutModel("LightningAddress", StringLocalizer["Lightning Address"]).SetCategory(WellKnownCategories.Store));
diff --git a/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml b/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml
index a548757..582b41a 100644
--- a/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml
+++ b/BTCPayServer/Views/UILightningAutomatedPayoutProcessors/Configure.cshtml
@@ -1,6 +1,5 @@
@using BTCPayServer.Client
@using BTCPayServer.Views.Stores
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.PayoutProcessors.Lightning.UILightningAutomatedPayoutProcessorsController.LightningTransferViewModel
@{
var storeId = Context.GetStoreData().Id;
diff --git a/BTCPayServer/Views/UIManage/APIKeys.cshtml b/BTCPayServer/Views/UIManage/APIKeys.cshtml
index 7061dcf..c8625ce 100644
--- a/BTCPayServer/Views/UIManage/APIKeys.cshtml
+++ b/BTCPayServer/Views/UIManage/APIKeys.cshtml
@@ -1,8 +1,5 @@
@namespace BTCPayServer.Client
-@using BTCPayServer.Abstractions.TagHelpers
-@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Html
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject Security.ContentSecurityPolicies Csp
@model BTCPayServer.Controllers.UIManageController.ApiKeysViewModel
@{
diff --git a/BTCPayServer/Views/UIManage/AddApiKey.cshtml b/BTCPayServer/Views/UIManage/AddApiKey.cshtml
index a1472ad..4f528f3 100644
--- a/BTCPayServer/Views/UIManage/AddApiKey.cshtml
+++ b/BTCPayServer/Views/UIManage/AddApiKey.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Client
@using BTCPayServer.Controllers
@model UIManageController.AddApiKeyViewModel
diff --git a/BTCPayServer/Views/UIManage/EnableAuthenticator.cshtml b/BTCPayServer/Views/UIManage/EnableAuthenticator.cshtml
index 71c3b56..4a6cdc9 100644
--- a/BTCPayServer/Views/UIManage/EnableAuthenticator.cshtml
+++ b/BTCPayServer/Views/UIManage/EnableAuthenticator.cshtml
@@ -1,8 +1,4 @@
-@using BTCPayServer.Components.QRCode
-@using BTCPayServer.Migrations
-@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Html
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model EnableAuthenticatorViewModel
@{
ViewData.SetLayoutModel(new LayoutModel(nameof(ManageNavPages.TwoFactorAuthentication), StringLocalizer["Enable Authenticator App"])
diff --git a/BTCPayServer/Views/UIManage/Index.cshtml b/BTCPayServer/Views/UIManage/Index.cshtml
index 793e311..f9c0a49 100644
--- a/BTCPayServer/Views/UIManage/Index.cshtml
+++ b/BTCPayServer/Views/UIManage/Index.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Abstractions.Contracts
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject IFileService FileService
@model IndexViewModel
@{
diff --git a/BTCPayServer/Views/UIOnChainAutomatedPayoutProcessors/Configure.cshtml b/BTCPayServer/Views/UIOnChainAutomatedPayoutProcessors/Configure.cshtml
index ea22639..22273db 100644
--- a/BTCPayServer/Views/UIOnChainAutomatedPayoutProcessors/Configure.cshtml
+++ b/BTCPayServer/Views/UIOnChainAutomatedPayoutProcessors/Configure.cshtml
@@ -1,6 +1,5 @@
@using BTCPayServer.Client
@using BTCPayServer.Views.Stores
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.PayoutProcessors.OnChain.UIOnChainAutomatedPayoutProcessorsController.OnChainTransferViewModel
@{
var storeId = Context.GetStoreData().Id;
diff --git a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml
index 7f5ba2a..6e92805 100644
--- a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml
+++ b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml
@@ -1,13 +1,7 @@
@using BTCPayServer.Services.PaymentRequests
@using System.Globalization
@using BTCPayServer.Client
-@using BTCPayServer.Controllers
@using BTCPayServer.Forms
-@using BTCPayServer.Plugins.Emails
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
-@using BTCPayServer.Data
-@using BTCPayServer.Services
@inject FormDataService FormDataService
@inject LinkGenerator LinkGenerator
@model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel
diff --git a/BTCPayServer/Views/UIPaymentRequest/GetPaymentRequests.cshtml b/BTCPayServer/Views/UIPaymentRequest/GetPaymentRequests.cshtml
index 6201b5a..4e47b61 100644
--- a/BTCPayServer/Views/UIPaymentRequest/GetPaymentRequests.cshtml
+++ b/BTCPayServer/Views/UIPaymentRequest/GetPaymentRequests.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Services.PaymentRequests
-@using Microsoft.AspNetCore.Html
@using BTCPayServer.Client
@using BTCPayServer.Services
@inject CallbackGenerator CallbackGenerator
diff --git a/BTCPayServer/Views/UIPayoutProcessors/ConfigureStorePayoutProcessors.cshtml b/BTCPayServer/Views/UIPayoutProcessors/ConfigureStorePayoutProcessors.cshtml
index 847a8fe..2a21f4c 100644
--- a/BTCPayServer/Views/UIPayoutProcessors/ConfigureStorePayoutProcessors.cshtml
+++ b/BTCPayServer/Views/UIPayoutProcessors/ConfigureStorePayoutProcessors.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Views.Stores
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Client
@model List<BTCPayServer.PayoutProcessors.UIPayoutProcessorsController.StorePayoutProcessorsView>
@{
diff --git a/BTCPayServer/Views/UIServer/CreateUser.cshtml b/BTCPayServer/Views/UIServer/CreateUser.cshtml
index 413532a..0c6f6fa 100644
--- a/BTCPayServer/Views/UIServer/CreateUser.cshtml
+++ b/BTCPayServer/Views/UIServer/CreateUser.cshtml
@@ -1,5 +1,3 @@
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.Controllers.RegisterFromAdminViewModel
@{
ViewData.SetLayoutModel(new(nameof(ServerNavPages.Users), StringLocalizer["Create account"]));
diff --git a/BTCPayServer/Views/UIServer/Maintenance.cshtml b/BTCPayServer/Views/UIServer/Maintenance.cshtml
index 9024610..853c907 100644
--- a/BTCPayServer/Views/UIServer/Maintenance.cshtml
+++ b/BTCPayServer/Views/UIServer/Maintenance.cshtml
@@ -1,6 +1,4 @@
-@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Html
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.Models.ServerViewModels.MaintenanceViewModel
@{
ViewData.SetLayoutModel(new LayoutModel(nameof(ServerNavPages.Maintenance), StringLocalizer["Maintenance"])
diff --git a/BTCPayServer/Views/UIServer/User.cshtml b/BTCPayServer/Views/UIServer/User.cshtml
index fe13b39..53da403 100644
--- a/BTCPayServer/Views/UIServer/User.cshtml
+++ b/BTCPayServer/Views/UIServer/User.cshtml
@@ -1,5 +1,4 @@
@using BTCPayServer.Abstractions.Contracts
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model UsersViewModel.UserViewModel
@inject IFileService FileService
@{
diff --git a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml
index 70b38bc..197e593 100644
--- a/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml
+++ b/BTCPayServer/Views/UIStores/CheckoutAppearance.cshtml
@@ -1,9 +1,6 @@
@using BTCPayServer.Payments
-@using Microsoft.AspNetCore.Mvc.TagHelpers
-@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client
-@using BTCPayServer.TagHelpers
@inject IFileService FileService
@model CheckoutAppearanceViewModel
@{
diff --git a/BTCPayServer/Views/UIStores/Dashboard.cshtml b/BTCPayServer/Views/UIStores/Dashboard.cshtml
index 23b0a8b..05c7063 100644
--- a/BTCPayServer/Views/UIStores/Dashboard.cshtml
+++ b/BTCPayServer/Views/UIStores/Dashboard.cshtml
@@ -1,11 +1,3 @@
-@using BTCPayServer.Components.StoreLightningBalance
-@using BTCPayServer.Components.StoreLightningServices
-@using BTCPayServer.Components.StoreNumbers
-@using BTCPayServer.Components.StoreRecentInvoices
-@using BTCPayServer.Components.StoreRecentTransactions
-@using BTCPayServer.Components.StoreWalletBalance
-@using BTCPayServer.Components.AppSales
-@using BTCPayServer.Components.AppTopItems
@using BTCPayServer.Client
@model StoreDashboardViewModel
@{
diff --git a/BTCPayServer/Views/UIStores/GeneralSettings.cshtml b/BTCPayServer/Views/UIStores/GeneralSettings.cshtml
index 1512c28..0980c5f 100644
--- a/BTCPayServer/Views/UIStores/GeneralSettings.cshtml
+++ b/BTCPayServer/Views/UIStores/GeneralSettings.cshtml
@@ -1,5 +1,3 @@
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client
@inject IFileService FileService;
diff --git a/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml
index e1b6875..a49a68e 100644
--- a/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml
+++ b/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml
@@ -1,8 +1,4 @@
-@using BTCPayServer.Abstractions.TagHelpers
-@using BTCPayServer.Blazor
@using BTCPayServer.Blazor.VaultBridge
-@using BTCPayServer.TagHelpers
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model WalletSetupViewModel
@{
diff --git a/BTCPayServer/Views/UIStores/StoreUsers.cshtml b/BTCPayServer/Views/UIStores/StoreUsers.cshtml
index aa7871a..801d21a 100644
--- a/BTCPayServer/Views/UIStores/StoreUsers.cshtml
+++ b/BTCPayServer/Views/UIStores/StoreUsers.cshtml
@@ -1,6 +1,5 @@
@using BTCPayServer.Services.Stores
@using BTCPayServer.Client
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model StoreUsersViewModel
@inject StoreRepository StoreRepository
@{
diff --git a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml
index ec2c469..e47ece6 100644
--- a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml
+++ b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Controllers
@model SignWithSeedViewModel
@{
var walletId = Context.GetRouteValue("walletId").ToString();
diff --git a/BTCPayServer/Views/UIWallets/WalletBumpFee.cshtml b/BTCPayServer/Views/UIWallets/WalletBumpFee.cshtml
index 835c8f0..c5c6dcd 100644
--- a/BTCPayServer/Views/UIWallets/WalletBumpFee.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletBumpFee.cshtml
@@ -1,7 +1,4 @@
-@using Microsoft.AspNetCore.Mvc.ModelBinding
@using BTCPayServer.Controllers
-@using BTCPayServer.Services
-@using BTCPayServer.Components.LabelManager
@model WalletBumpFeeViewModel
@{
var walletId = Context.GetRouteValue("walletId").ToString();
diff --git a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml
index 1cdef74..7178217 100644
--- a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Controllers
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
@model WalletPSBTViewModel
@{
diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml
index 1b29fa6..7b3b445 100644
--- a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Controllers
@model WalletPSBTCombineViewModel
@{
var walletId = Context.GetRouteValue("walletId").ToString();
diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml
index edbb6bb..3e58913 100644
--- a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Controllers
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
@model WalletPSBTViewModel
@{
diff --git a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml
index 45d9816..f2a87be 100644
--- a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml
@@ -1,6 +1,5 @@
@inject BTCPayServerEnvironment env
@using BTCPayServer.Controllers
-@using BTCPayServer.Components.QRCode
@using BTCPayServer.Services
@model BTCPayServer.Controllers.WalletReceiveViewModel
@{
diff --git a/BTCPayServer/Views/UIWallets/WalletSend.cshtml b/BTCPayServer/Views/UIWallets/WalletSend.cshtml
index 63ee040..9930ffb 100644
--- a/BTCPayServer/Views/UIWallets/WalletSend.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletSend.cshtml
@@ -1,8 +1,5 @@
@using Microsoft.AspNetCore.Mvc.ModelBinding
-@using BTCPayServer.Controllers
@using BTCPayServer.Services
-@using BTCPayServer.Components.LabelManager
-@using BTCPayServer.Components.UIExtensionPoint
@inject BTCPayServer.Security.ContentSecurityPolicies Csp
@model WalletSendModel
@{
diff --git a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml
index 32aefe5..d1cc234 100644
--- a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml
@@ -1,4 +1,3 @@
-@using BTCPayServer.Controllers
@model WalletSigningOptionsModel
@inject BTCPayNetworkProvider BTCPayNetworkProvider
@{
diff --git a/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml b/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml
index ce1fb65..eb617c7 100644
--- a/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml
+++ b/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml
@@ -1,10 +1,5 @@
-@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Client
-@using BTCPayServer.Components
-@using BTCPayServer.Components.WalletNav
-@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Html
-@using Microsoft.AspNetCore.Mvc.TagHelpers
@model ListTransactionsViewModel
@{
diff --git a/BTCPayServer/WebsocketExtensions.cs b/BTCPayServer/WebsocketExtensions.cs
index 75547fd..ed8b06a 100644
--- a/BTCPayServer/WebsocketExtensions.cs
+++ b/BTCPayServer/WebsocketExtensions.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.