From 78b86ce0ea08d092dc7cac7d85dbe9b33232a663 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 6 Oct 2019 18:47:49 +0900 Subject: [PATCH] Fix build in netcoreapp21 --- BTCPayServer.Tests/TestUtils.cs | 2 +- BTCPayServer/Services/Invoices/InvoiceRepository.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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); } }