Make sure to only select accounted payments where we should (#2523)

This commit is contained in:
Nicolas Dorier
2021-05-14 16:16:19 +09:00
committed by GitHub
parent 776ded0b7e
commit c551e5cd0a
16 changed files with 48 additions and 42 deletions

View File

@@ -359,7 +359,7 @@ namespace BTCPayServer.Controllers
return new InvoiceDetailsModel
{
Archived = invoice.Archived,
Payments = invoice.GetPayments(),
Payments = invoice.GetPayments(false),
CryptoPayments = invoice.GetPaymentMethods().Select(
data =>
{
@@ -561,7 +561,7 @@ namespace BTCPayServer.Controllers
Status = invoice.StatusString,
#pragma warning restore CS0618 // Type or member is obsolete
NetworkFee = paymentMethodDetails.GetNextNetworkFee(),
IsMultiCurrency = invoice.GetPayments().Select(p => p.GetPaymentMethodId()).Concat(new[] { paymentMethod.GetId() }).Distinct().Count() > 1,
IsMultiCurrency = invoice.GetPayments(false).Select(p => p.GetPaymentMethodId()).Concat(new[] { paymentMethod.GetId() }).Distinct().Count() > 1,
StoreId = store.Id,
AvailableCryptos = invoice.GetPaymentMethods()
.Where(i => i.Network != null)