Fix: Invoice's orderId equals to payreq id shouldn't appear part of the payreq

This commit is contained in:
nicolas.dorier 2022-10-27 13:17:18 +09:00
parent c0125b83d1
commit 9e73260230
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -133,7 +133,9 @@ namespace BTCPayServer.Services.PaymentRequests
}
invoiceQuery.OrderId = new[] { GetOrderIdForPaymentRequest(paymentRequestId) };
return await _InvoiceRepository.GetInvoices(invoiceQuery);
return (await _InvoiceRepository.GetInvoices(invoiceQuery))
.Where(i => i.InternalTags.Contains(GetInternalTag(paymentRequestId)))
.ToArray();
}
public static string GetOrderIdForPaymentRequest(string paymentRequestId)