A local-first personal finance app
:bug: (bank-sync) fix account highlight dissapearing (#2898)
Matiss Janis Aboltins866b4d6cd40e
diff --git a/packages/loot-core/src/client/reducers/queries.ts b/packages/loot-core/src/client/reducers/queries.tsindex b0c38817a2..84528cc12b 100644--- a/packages/loot-core/src/client/reducers/queries.ts+++ b/packages/loot-core/src/client/reducers/queries.ts@@ -29,9 +29,15 @@ export function update(state = initialState, action: Action): QueriesState {case constants.SET_NEW_TRANSACTIONS:return {...state,- newTransactions: action.newTransactions || [],- matchedTransactions: action.matchedTransactions || [],- updatedAccounts: action.updatedAccounts || [],+ newTransactions: action.newTransactions+ ? [...state.newTransactions, ...action.newTransactions]+ : state.newTransactions,+ matchedTransactions: action.matchedTransactions+ ? [...state.matchedTransactions, ...action.matchedTransactions]+ : state.matchedTransactions,+ updatedAccounts: action.updatedAccounts+ ? [...state.updatedAccounts, ...action.updatedAccounts]+ : state.updatedAccounts,};case constants.UPDATE_NEW_TRANSACTIONS:return {diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.tsindex 3c1be8ef49..44738736f8 100644--- a/packages/loot-core/src/server/main.ts+++ b/packages/loot-core/src/server/main.ts@@ -1075,7 +1075,6 @@ handlers['accounts-bank-sync'] = async function ({ id }) {acct.account_id,acct.bankId,);- console.groupEnd();const { added, updated } = res;@@ -1113,6 +1112,8 @@ handlers['accounts-bank-sync'] = async function ({ id }) {captureException(err);}+ } finally {+ console.groupEnd();}}}diff --git a/upcoming-release-notes/2898.md b/upcoming-release-notes/2898.mdnew file mode 100644index 0000000000..fc60b25516--- /dev/null+++ b/upcoming-release-notes/2898.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [MatissJanis]+---++Bank sync: fix account with new transactions highlight disappearing if multiple consecutive accounts are synced.