diff --git a/apps/api/v1/services/wallet.service.ts b/apps/api/v1/services/wallet.service.ts index 25c32fdb..3ee90012 100644 --- a/apps/api/v1/services/wallet.service.ts +++ b/apps/api/v1/services/wallet.service.ts @@ -69,10 +69,10 @@ export async function getWalletBalance({ const balance = await prisma.transaction.aggregate({ where: { walletAccountId: wallet.id }, // biome-ignore lint/style/useNamingConvention: - _sum: { amount: true }, + _sum: { amountInVnd: true }, }) - return balance._sum.amount || 0 + return balance._sum.amountInVnd || 0 } // biome-ignore lint/correctness/noUnusedVariables: