From 8e8b011fdd3ee7f4a36bdc0e39d18debfeaf9d19 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 8 Sep 2025 13:43:39 +0800 Subject: [PATCH] :bug: Trying to fix transaction history API --- DysonNetwork.Pass/Wallet/WalletController.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/DysonNetwork.Pass/Wallet/WalletController.cs b/DysonNetwork.Pass/Wallet/WalletController.cs index 7c28121..45132be 100644 --- a/DysonNetwork.Pass/Wallet/WalletController.cs +++ b/DysonNetwork.Pass/Wallet/WalletController.cs @@ -50,10 +50,11 @@ public class WalletController(AppDatabase db, WalletService ws, PaymentService p if (accountWallet is null) return NotFound(); var query = db.PaymentTransactions.AsQueryable() - .Include(t => t.PayeeWallet) - .Include(t => t.PayerWallet) - .Where(t => (t.PayeeWallet == null || t.PayeeWalletId == accountWallet.Id) || - (t.PayerWallet == null || t.PayerWalletId == accountWallet.Id)); + .Where(t => + (t.PayeeWalletId == null || t.PayeeWalletId == accountWallet.Id) && + (t.PayerWalletId == null || t.PayerWalletId == accountWallet.Id) && + !(t.PayerWalletId == null && t.PayeeWalletId == null) + ); var transactionCount = await query.CountAsync(); var transactions = await query