From e86f63002453cc71ef3cdc21a42e19803040c401 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 4 Feb 2026 12:07:26 +0800 Subject: [PATCH] :bug: Fix wallet queries --- DysonNetwork.Wallet/Payment/PaymentService.cs | 8 -------- DysonNetwork.Wallet/Payment/WalletController.cs | 6 ------ 2 files changed, 14 deletions(-) diff --git a/DysonNetwork.Wallet/Payment/PaymentService.cs b/DysonNetwork.Wallet/Payment/PaymentService.cs index 877fe537..ea7dd156 100644 --- a/DysonNetwork.Wallet/Payment/PaymentService.cs +++ b/DysonNetwork.Wallet/Payment/PaymentService.cs @@ -506,10 +506,6 @@ public class PaymentService( // Load the fund with account data including profiles var createdFund = await db.WalletFunds .Include(f => f.Recipients) - .ThenInclude(r => r.RecipientAccount) - .ThenInclude(a => a.Profile) - .Include(f => f.CreatorAccount) - .ThenInclude(a => a.Profile) .FirstOrDefaultAsync(f => f.Id == fund.Id); return createdFund!; @@ -751,10 +747,6 @@ public class PaymentService( { var fund = await db.WalletFunds .Include(f => f.Recipients) - .ThenInclude(r => r.RecipientAccount) - .ThenInclude(a => a.Profile) - .Include(f => f.CreatorAccount) - .ThenInclude(a => a.Profile) .FirstOrDefaultAsync(f => f.Id == fundId); if (fund == null) diff --git a/DysonNetwork.Wallet/Payment/WalletController.cs b/DysonNetwork.Wallet/Payment/WalletController.cs index 71e4effd..f8192950 100644 --- a/DysonNetwork.Wallet/Payment/WalletController.cs +++ b/DysonNetwork.Wallet/Payment/WalletController.cs @@ -137,9 +137,7 @@ public class WalletController( .Skip(offset) .Take(take) .Include(t => t.PayerWallet) - .ThenInclude(w => w!.Account) .Include(t => t.PayeeWallet) - .ThenInclude(w => w!.Account) .ToListAsync(); return Ok(transactions); @@ -300,8 +298,6 @@ public class WalletController( var currentUserId = Guid.Parse(currentUser.Id); var query = db.WalletFunds .Include(f => f.Recipients) - .ThenInclude(r => r.RecipientAccount) - .Include(f => f.CreatorAccount) .Where(f => f.CreatorAccountId == currentUserId || f.Recipients.Any(r => r.RecipientAccountId == currentUserId)) .AsQueryable(); @@ -328,8 +324,6 @@ public class WalletController( { var fund = await db.WalletFunds .Include(f => f.Recipients) - .ThenInclude(r => r.RecipientAccount) - .Include(f => f.CreatorAccount) .FirstOrDefaultAsync(f => f.Id == id); if (fund is null)