mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
Fix warnings
This commit is contained in:
parent
c8dd13577e
commit
a30456a92d
@ -65,7 +65,7 @@ namespace BTCPayServer.HostedServices
|
||||
readonly CompositeDisposable leases = new CompositeDisposable();
|
||||
|
||||
|
||||
private async Task UpdateInvoice(UpdateInvoiceContext context)
|
||||
private void UpdateInvoice(UpdateInvoiceContext context)
|
||||
{
|
||||
var invoice = context.Invoice;
|
||||
if (invoice.Status == InvoiceStatus.New && invoice.ExpirationTime <= DateTimeOffset.UtcNow)
|
||||
@ -283,7 +283,7 @@ namespace BTCPayServer.HostedServices
|
||||
if (invoice == null)
|
||||
break;
|
||||
var updateContext = new UpdateInvoiceContext(invoice);
|
||||
await UpdateInvoice(updateContext);
|
||||
UpdateInvoice(updateContext);
|
||||
if (updateContext.Unaffect)
|
||||
{
|
||||
await _InvoiceRepository.UnaffectAddress(invoice.Id);
|
||||
|
@ -808,23 +808,19 @@ namespace BTCPayServer.Services.Invoices
|
||||
public bool CanMarkComplete()
|
||||
{
|
||||
return (Status == InvoiceStatus.Paid) ||
|
||||
#pragma warning disable CA1305 // Specify IFormatProvider
|
||||
((Status == InvoiceStatus.New || Status == InvoiceStatus.Expired) && ExceptionStatus == InvoiceExceptionStatus.PaidPartial) ||
|
||||
((Status == InvoiceStatus.New || Status == InvoiceStatus.Expired) && ExceptionStatus == InvoiceExceptionStatus.PaidLate) ||
|
||||
(Status != InvoiceStatus.Complete && ExceptionStatus == InvoiceExceptionStatus.Marked) ||
|
||||
(Status == InvoiceStatus.Invalid);
|
||||
#pragma warning restore CA1305 // Specify IFormatProvider
|
||||
}
|
||||
|
||||
public bool CanMarkInvalid()
|
||||
{
|
||||
return (Status == InvoiceStatus.Paid) ||
|
||||
(Status == InvoiceStatus.New) ||
|
||||
#pragma warning disable CA1305 // Specify IFormatProvider
|
||||
((Status == InvoiceStatus.New || Status == InvoiceStatus.Expired) && ExceptionStatus == InvoiceExceptionStatus.PaidPartial) ||
|
||||
((Status == InvoiceStatus.New || Status == InvoiceStatus.Expired) && ExceptionStatus == InvoiceExceptionStatus.PaidLate) ||
|
||||
(Status != InvoiceStatus.Invalid && ExceptionStatus == InvoiceExceptionStatus.Marked);
|
||||
#pragma warning restore CA1305 // Specify IFormatProvider;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
|
@ -330,7 +330,9 @@ retry:
|
||||
var paymentMethodIdStr = paymentMethodId?.ToString();
|
||||
var addresses = context.HistoricalAddressInvoices.Where(data =>
|
||||
(data.InvoiceDataId == invoiceId && paymentMethodIdStr == null ||
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
data.CryptoCode == paymentMethodIdStr) &&
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
data.UnAssigned == null);
|
||||
foreach (var historicalAddressInvoiceData in addresses)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ namespace BTCPayServer.Services.Notifications
|
||||
query = query.Where(store => store.DisabledNotifications != "all");
|
||||
foreach (string term in terms)
|
||||
{
|
||||
query = query.Where(user => user.DisabledNotifications == null || !user.DisabledNotifications.Contains(term));
|
||||
query = query.Where(user => user.DisabledNotifications == null || !user.DisabledNotifications.Contains(term, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
return query.Select(user => user.Id).ToArray();
|
||||
|
Loading…
Reference in New Issue
Block a user