mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Make sure to only select accounted payments where we should (#2523)
This commit is contained in:
@@ -133,9 +133,9 @@ namespace BTCPayServer
|
||||
finally { try { webSocket.Dispose(); } catch { } }
|
||||
}
|
||||
|
||||
public static IEnumerable<BitcoinLikePaymentData> GetAllBitcoinPaymentData(this InvoiceEntity invoice)
|
||||
public static IEnumerable<BitcoinLikePaymentData> GetAllBitcoinPaymentData(this InvoiceEntity invoice, bool accountedOnly)
|
||||
{
|
||||
return invoice.GetPayments()
|
||||
return invoice.GetPayments(accountedOnly)
|
||||
.Where(p => p.GetPaymentMethodId()?.PaymentType == PaymentTypes.BTCLike)
|
||||
.Select(p => (BitcoinLikePaymentData)p.GetCryptoPaymentData())
|
||||
.Where(data => data != null);
|
||||
|
||||
Reference in New Issue
Block a user