diff --git a/BTCPayServer.Tests/TestUtils.cs b/BTCPayServer.Tests/TestUtils.cs index efc2bc3c0..41f3c4ab4 100644 --- a/BTCPayServer.Tests/TestUtils.cs +++ b/BTCPayServer.Tests/TestUtils.cs @@ -46,7 +46,7 @@ namespace BTCPayServer.Tests formFile.ContentDisposition = $"form-data; name=\"file\"; filename=\"{fileInfo.Name}\""; return formFile; } - public static void Eventually(Action act, int ms = 200000) + public static void Eventually(Action act, int ms = 20_000) { CancellationTokenSource cts = new CancellationTokenSource(ms); while (true) diff --git a/BTCPayServer/Services/Invoices/InvoiceRepository.cs b/BTCPayServer/Services/Invoices/InvoiceRepository.cs index 897303b09..a8315873f 100644 --- a/BTCPayServer/Services/Invoices/InvoiceRepository.cs +++ b/BTCPayServer/Services/Invoices/InvoiceRepository.cs @@ -86,12 +86,18 @@ retry: using (var db = _ContextFactory.CreateContext()) { return (await db.AddressInvoices +#if !NETCOREAPP21 .Include(a => a.InvoiceData.Payments) .Include(a => a.InvoiceData.RefundAddresses) +#endif #pragma warning disable CS0618 .Where(a => addresses.Contains(a.Address)) #pragma warning restore CS0618 .Select(a => a.InvoiceData) +#if NETCOREAPP21 + .Include(a => a.Payments) + .Include(a => a.RefundAddresses) +#endif .ToListAsync()).Select(ToEntity); } }