diff --git a/src/services/transactionService.ts b/src/services/transactionService.ts index a41f13b..e880e3d 100644 --- a/src/services/transactionService.ts +++ b/src/services/transactionService.ts @@ -29,7 +29,10 @@ function transformTransaction(apiTransaction: Record): Transact amount: apiTransaction.amount as number, type: apiTransaction.type as TransactionType, categoryId: (apiTransaction.category_id ?? apiTransaction.categoryId) as number, + // Map nested objects if they exist + category: apiTransaction.category as import('../types').Category | undefined, accountId: (apiTransaction.account_id ?? apiTransaction.accountId) as number, + account: apiTransaction.account as import('../types').Account | undefined, currency: apiTransaction.currency as CurrencyCode, transactionDate: (apiTransaction.transaction_date ?? apiTransaction.transactionDate) as string, note: apiTransaction.note as string | undefined,