From eb35b41c6ddc49dfec94a67442d08a0d2f85c70f Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Wed, 11 Jun 2025 10:46:40 -0400 Subject: [PATCH] fix preview transactions not showing on multi-account views (#5135) --- .../src/hooks/useAccountPreviewTransactions.ts | 9 +++++---- upcoming-release-notes/5135.md | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 upcoming-release-notes/5135.md diff --git a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts index c100b623b4..b10786807d 100644 --- a/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts +++ b/packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts @@ -58,6 +58,7 @@ export function useAccountPreviewTransactions({ const accountSchedulesFilter = useCallback( (schedule: ScheduleEntity) => + !accountId || schedule._account === accountId || getTransferAccountByPayee(schedule._payee)?.id === accountId, [accountId, getTransferAccountByPayee], @@ -82,10 +83,10 @@ export function useAccountPreviewTransactions({ return useMemo(() => { if (!accountId) { return { - previewTransactions: [], - runningBalances: new Map(), - isLoading: false, - error: undefined, + previewTransactions: allPreviewTransactions, + runningBalances: allRunningBalances, + isLoading, + error, }; } diff --git a/upcoming-release-notes/5135.md b/upcoming-release-notes/5135.md new file mode 100644 index 0000000000..46ebbbb732 --- /dev/null +++ b/upcoming-release-notes/5135.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [matt-fidd] +--- + +Fix preview transactions not showing on multi-account views