From 8308325b737fef8be7df1c8e9451ee4ff768855e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 9 Sep 2025 00:34:59 +0800 Subject: [PATCH] :bug: Trying to fix wallet transactions history error --- DysonNetwork.Pass/Wallet/WalletController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DysonNetwork.Pass/Wallet/WalletController.cs b/DysonNetwork.Pass/Wallet/WalletController.cs index ea0b6f5..8537834 100644 --- a/DysonNetwork.Pass/Wallet/WalletController.cs +++ b/DysonNetwork.Pass/Wallet/WalletController.cs @@ -51,6 +51,7 @@ public class WalletController(AppDatabase db, WalletService ws, PaymentService p var query = db.PaymentTransactions .Where(t => t.PayeeWalletId == accountWallet.Id || t.PayerWalletId == accountWallet.Id) + .OrderByDescending(t => t.CreatedAt) .AsQueryable(); var transactionCount = await query.CountAsync(); @@ -59,7 +60,6 @@ public class WalletController(AppDatabase db, WalletService ws, PaymentService p var transactions = await query .Skip(offset) .Take(take) - .OrderByDescending(t => t.CreatedAt) .ToListAsync(); return Ok(transactions);