fix preview transactions not showing on multi-account views (#5135)

This commit is contained in:
Matt Fiddaman
2025-06-11 10:46:40 -04:00
committed by GitHub
parent a025d2b621
commit eb35b41c6d
2 changed files with 11 additions and 4 deletions

View File

@@ -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,
};
}