diff --git a/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj b/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
index e5c5406d0..e298d82dd 100644
--- a/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
+++ b/BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
@@ -32,10 +32,10 @@
-
-
-
-
+
+
+
+
diff --git a/BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs b/BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs
index 96006b735..d58cc4332 100644
--- a/BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs
+++ b/BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs
@@ -84,6 +84,7 @@ namespace BTCPayServer.Abstractions.Contracts
.UseNpgsql(_options.Value.ConnectionString, o =>
{
o.EnableRetryOnFailure(10);
+ o.SetPostgresVersion(12, 0);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
diff --git a/BTCPayServer.Abstractions/Form/Form.cs b/BTCPayServer.Abstractions/Form/Form.cs
index 0f91954e2..f6e46af15 100644
--- a/BTCPayServer.Abstractions/Form/Form.cs
+++ b/BTCPayServer.Abstractions/Form/Form.cs
@@ -5,7 +5,6 @@ using System.Reflection;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json.Linq;
-using Npgsql.Internal.TypeHandlers.GeometricHandlers;
namespace BTCPayServer.Abstractions.Form;
diff --git a/BTCPayServer.Client/BTCPayServer.Client.csproj b/BTCPayServer.Client/BTCPayServer.Client.csproj
index e91cf308a..60a9ee495 100644
--- a/BTCPayServer.Client/BTCPayServer.Client.csproj
+++ b/BTCPayServer.Client/BTCPayServer.Client.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/BTCPayServer.Data/BTCPayServer.Data.csproj b/BTCPayServer.Data/BTCPayServer.Data.csproj
index 856815148..e497e8e4f 100644
--- a/BTCPayServer.Data/BTCPayServer.Data.csproj
+++ b/BTCPayServer.Data/BTCPayServer.Data.csproj
@@ -1,13 +1,13 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/BTCPayServer.Data/Data/AddressInvoiceData.cs b/BTCPayServer.Data/Data/AddressInvoiceData.cs
index 0d62df7b3..8e08e82a1 100644
--- a/BTCPayServer.Data/Data/AddressInvoiceData.cs
+++ b/BTCPayServer.Data/Data/AddressInvoiceData.cs
@@ -1,5 +1,6 @@
using System;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.Data/Data/RefundData.cs b/BTCPayServer.Data/Data/RefundData.cs
index dafbe5bf9..8aa6c402b 100644
--- a/BTCPayServer.Data/Data/RefundData.cs
+++ b/BTCPayServer.Data/Data/RefundData.cs
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
namespace BTCPayServer.Data
{
diff --git a/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj b/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj
index c637eaf00..4c531e494 100644
--- a/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj
+++ b/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
1.0.0.0
true
btcpay-plugin
diff --git a/BTCPayServer.Rating/BTCPayServer.Rating.csproj b/BTCPayServer.Rating/BTCPayServer.Rating.csproj
index 5ccd765da..2165a3708 100644
--- a/BTCPayServer.Rating/BTCPayServer.Rating.csproj
+++ b/BTCPayServer.Rating/BTCPayServer.Rating.csproj
@@ -4,9 +4,9 @@
-
+
-
+
diff --git a/BTCPayServer.Tests/BTCPayServer.Tests.csproj b/BTCPayServer.Tests/BTCPayServer.Tests.csproj
index 558d28098..80c1f8114 100644
--- a/BTCPayServer.Tests/BTCPayServer.Tests.csproj
+++ b/BTCPayServer.Tests/BTCPayServer.Tests.csproj
@@ -19,13 +19,13 @@
-
+
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/BTCPayServer.Tests/Dockerfile b/BTCPayServer.Tests/Dockerfile
index ec9cea303..04e2e763e 100644
--- a/BTCPayServer.Tests/Dockerfile
+++ b/BTCPayServer.Tests/Dockerfile
@@ -1,4 +1,4 @@
-FROM mcr.microsoft.com/dotnet/sdk:6.0.401-bullseye-slim AS builder
+FROM mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends chromium-driver \
&& rm -rf /var/lib/apt/lists/*
diff --git a/BTCPayServer.Tests/ThirdPartyTests.cs b/BTCPayServer.Tests/ThirdPartyTests.cs
index a699c7f9a..2b0c6350f 100644
--- a/BTCPayServer.Tests/ThirdPartyTests.cs
+++ b/BTCPayServer.Tests/ThirdPartyTests.cs
@@ -268,7 +268,7 @@ retry:
}
catch (Exception ex)
{
- var details = ex is EqualException ? (ex as EqualException).Actual : ex.Message;
+ var details = ex.Message;
TestLogs.LogInformation($"FAILED: {url} ({file}) {details}");
throw;
diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs
index 46d5dfe1c..ec2f43558 100644
--- a/BTCPayServer.Tests/UnitTest1.cs
+++ b/BTCPayServer.Tests/UnitTest1.cs
@@ -269,7 +269,7 @@ namespace BTCPayServer.Tests
}
catch (Exception ex)
{
- var details = ex is EqualException ? (ex as EqualException).Actual : ex.Message;
+ var details = ex.Message;
TestLogs.LogInformation($"FAILED: {url} ({file}) {details}");
throw;
diff --git a/BTCPayServer.Tests/docker-compose.altcoins.yml b/BTCPayServer.Tests/docker-compose.altcoins.yml
index 1cd3fc5e4..625835aa2 100644
--- a/BTCPayServer.Tests/docker-compose.altcoins.yml
+++ b/BTCPayServer.Tests/docker-compose.altcoins.yml
@@ -99,7 +99,7 @@ services:
custom:
nbxplorer:
- image: nicolasdorier/nbxplorer:2.3.66
+ image: nicolasdorier/nbxplorer:2.4.0
restart: unless-stopped
ports:
- "32838:32838"
diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml
index 5b6cdb56a..05503ab70 100644
--- a/BTCPayServer.Tests/docker-compose.yml
+++ b/BTCPayServer.Tests/docker-compose.yml
@@ -96,7 +96,7 @@ services:
custom:
nbxplorer:
- image: nicolasdorier/nbxplorer:2.3.66
+ image: nicolasdorier/nbxplorer:2.4.0
restart: unless-stopped
ports:
- "32838:32838"
diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj
index 49ad44e4f..e6d0555e9 100644
--- a/BTCPayServer/BTCPayServer.csproj
+++ b/BTCPayServer/BTCPayServer.csproj
@@ -50,22 +50,22 @@
-
+
-
+
-
-
-
+
+
+
@@ -75,8 +75,8 @@
-
-
+
+
diff --git a/BTCPayServer/Controllers/UIInvoiceController.UI.cs b/BTCPayServer/Controllers/UIInvoiceController.UI.cs
index 6f2eb46dc..9a8ba6531 100644
--- a/BTCPayServer/Controllers/UIInvoiceController.UI.cs
+++ b/BTCPayServer/Controllers/UIInvoiceController.UI.cs
@@ -550,6 +550,7 @@ namespace BTCPayServer.Controllers
Html = "Refund successfully created!
Share the link to this page with a customer.
The customer needs to enter their address and claim the refund.
Once a customer claims the refund, you will get a notification and would need to approve and initiate it from your Store > Payouts.",
Severity = StatusMessageModel.StatusSeverity.Success
});
+
ctx.Refunds.Add(new RefundData
{
InvoiceDataId = invoice.Id,
diff --git a/BTCPayServer/Hosting/Startup.cs b/BTCPayServer/Hosting/Startup.cs
index a75e84a50..0bcf00d08 100644
--- a/BTCPayServer/Hosting/Startup.cs
+++ b/BTCPayServer/Hosting/Startup.cs
@@ -273,15 +273,6 @@ namespace BTCPayServer.Hosting
app.UseRouting();
app.UseCors();
-
- // HACK: Make blazor js available on: ~/_blazorfiles/_framework/blazor.server.js
- // Workaround this bug https://github.com/dotnet/aspnetcore/issues/19578
- app.UseStaticFiles(new StaticFileOptions()
- {
- RequestPath = "/_blazorfiles",
- FileProvider = new ManifestEmbeddedFileProvider(typeof(ComponentServiceCollectionExtensions).Assembly),
- OnPrepareResponse = LongCache
- });
app.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = LongCache
diff --git a/BTCPayServer/Hosting/ToPostgresMigrationStartupTask.cs b/BTCPayServer/Hosting/ToPostgresMigrationStartupTask.cs
index 4d63c7ef4..4c594941b 100644
--- a/BTCPayServer/Hosting/ToPostgresMigrationStartupTask.cs
+++ b/BTCPayServer/Hosting/ToPostgresMigrationStartupTask.cs
@@ -173,7 +173,11 @@ namespace BTCPayServer.Hosting
return;
{
var postgres = new NpgsqlConnectionStringBuilder(p);
- using var postgresContext = new ApplicationDbContext(new DbContextOptionsBuilder().UseNpgsql(p, o => o.CommandTimeout(60 * 60 * 10)).Options);
+ using var postgresContext = new ApplicationDbContext(new DbContextOptionsBuilder().UseNpgsql(p, o =>
+ {
+ o.CommandTimeout(60 * 60 * 10);
+ o.SetPostgresVersion(12, 0);
+ }).Options);
string? state;
try
{
@@ -212,7 +216,7 @@ namespace BTCPayServer.Hosting
foreach (var t in postgresContext.Model.GetRelationalModel().Tables.OrderByTopology())
{
var typeMapping = t.EntityTypeMappings.Single();
- var query = (IQueryable