From aec5914eb2f18c409d8e38162afe1b7b8fb63381 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Tue, 14 Jan 2025 10:01:52 -0800 Subject: [PATCH] Remove action imports --- packages/desktop-client/src/index.tsx | 2 -- packages/loot-core/src/client/app/appSlice.ts | 20 +++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/desktop-client/src/index.tsx b/packages/desktop-client/src/index.tsx index 684a3e43467..b663e02ebec 100644 --- a/packages/desktop-client/src/index.tsx +++ b/packages/desktop-client/src/index.tsx @@ -14,7 +14,6 @@ import { bindActionCreators } from '@reduxjs/toolkit'; import { createRoot } from 'react-dom/client'; import * as accountsSlice from 'loot-core/src/client/accounts/accountsSlice'; -import * as actions from 'loot-core/src/client/actions'; import * as appSlice from 'loot-core/src/client/app/appSlice'; import * as budgetsSlice from 'loot-core/src/client/budgets/budgetsSlice'; import * as modalsSlice from 'loot-core/src/client/modals/modalsSlice'; @@ -39,7 +38,6 @@ import 'focus-visible'; const boundActions = bindActionCreators( { - ...actions, ...accountsSlice.actions, ...appSlice.actions, ...budgetsSlice.actions, diff --git a/packages/loot-core/src/client/app/appSlice.ts b/packages/loot-core/src/client/app/appSlice.ts index a61ef29af32..18ae90b8637 100644 --- a/packages/loot-core/src/client/app/appSlice.ts +++ b/packages/loot-core/src/client/app/appSlice.ts @@ -5,9 +5,9 @@ import { getUploadError } from '../../shared/errors'; import { type AccountEntity } from '../../types/models'; import { type AtLeastOne } from '../../types/util'; import { syncAccounts } from '../accounts/accountsSlice'; -import { loadPrefs } from '../actions'; import { pushModal } from '../modals/modalsSlice'; import { createAppAsyncThunk } from '../redux'; +import { loadPrefs } from '../prefs/prefsSlice'; const sliceName = 'app'; @@ -52,11 +52,13 @@ export const resetSync = createAppAsyncThunk( ) { dispatch( pushModal({ - name: 'fix-encryption-key', - options: { - onSuccess: () => { - // TODO: There won't be a loading indicator for this - dispatch(resetSync()); + modal: { + name: 'fix-encryption-key', + options: { + onSuccess: () => { + // TODO: There won't be a loading indicator for this + dispatch(resetSync()); + }, }, }, }), @@ -64,8 +66,10 @@ export const resetSync = createAppAsyncThunk( } else if (error.reason === 'encrypt-failure') { dispatch( pushModal({ - name: 'create-encryption-key', - options: { recreate: true }, + modal: { + name: 'create-encryption-key', + options: { recreate: true }, + }, }), ); }