diff --git a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts index 04b630f43d1..ca1471c999b 100644 --- a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts +++ b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts @@ -11,7 +11,7 @@ import { useAccounts } from './useAccounts'; import { usePayees } from './usePayees'; type UseAccountPreviewTransactionsProps = { - accountId: AccountEntity['id']; + accountId?: AccountEntity['id']; }; type UseAccountPreviewTransactionsResult = { @@ -32,9 +32,14 @@ export function useAccountPreviewTransactions({ const payees = usePayees(); const previewTransactions = useMemo(() => { - if (!accountId || isLoading) { + if (isLoading) { return []; } + + if (!accountId) { + return originalPreviewTransactions; + } + return accountPreview({ accountId, transactions: originalPreviewTransactions, diff --git a/upcoming-release-notes/3873.md b/upcoming-release-notes/3873.md new file mode 100644 index 00000000000..a1843db3a31 --- /dev/null +++ b/upcoming-release-notes/3873.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [joel-jeremy] +--- + +Fix preview transactions not showing in all accounts and aggregated accounts (budgeted/offbudget)