mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-10 08:44:23 +01:00
@@ -52,8 +52,7 @@ namespace BTCPayServer.Services.Invoices
|
||||
ctx.PendingInvoices.Remove(new PendingInvoiceData() { Id = invoiceId });
|
||||
try
|
||||
{
|
||||
if (await ctx.SaveChangesAsync() == 0)
|
||||
return false;
|
||||
await ctx.SaveChangesAsync();
|
||||
return true;
|
||||
}
|
||||
catch (DbUpdateException) { return false; }
|
||||
@@ -509,13 +508,6 @@ namespace BTCPayServer.Services.Invoices
|
||||
|
||||
try
|
||||
{
|
||||
if (context.Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite")
|
||||
{
|
||||
if (await context.Payments.AnyAsync(p => p.Id == paymentData.GetPaymentId()))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (await context.SaveChangesAsync().ConfigureAwait(false) == 0)
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user