diff --git a/packages/desktop-client/src/components/modals/CreateAccount.tsx b/packages/desktop-client/src/components/modals/CreateAccount.tsx index e5792dfbc6a..5ccf875e4c9 100644 --- a/packages/desktop-client/src/components/modals/CreateAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccount.tsx @@ -48,13 +48,6 @@ export function CreateAccount({ } }; - type NormalizedAccount = { - account_id: string; - name: string; - institution: string; - orgDomain: string; - }; - const onConnectSimpleFin = async () => { if (!isSimpleFinSetupComplete) { onSimpleFinInit(); @@ -71,15 +64,23 @@ export function CreateAccount({ const newAccounts = []; - for (let i = 0; i < results.accounts.accounts.length; i++) { - const oldAccount = results.accounts.accounts[i]; - const newAccount = {}; - newAccount.account_id = oldAccount.id; - newAccount.name = oldAccount.name; - newAccount.institution = { - name: oldAccount.org.name, + type NormalizedAccount = { + account_id: string; + name: string; + institution: string; + orgDomain: string; + }; + + for (let i = 0; i < results.accounts.length; i++) { + const oldAccount = results.accounts[i]; + + const newAccount: NormalizedAccount = { + account_id: oldAccount.id, + name: oldAccount.name, + institution: oldAccount.org.name, + orgDomain: oldAccount.org.domain, }; - newAccount.orgDomain = oldAccount.org.domain; + newAccounts.push(newAccount); } diff --git a/packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx b/packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx index bd9e199db55..c7db9c3e081 100644 --- a/packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx +++ b/packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx @@ -4,12 +4,12 @@ import { send } from 'loot-core/src/platform/client/fetch'; import { Error } from '../alerts'; import { ButtonWithLoading } from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; -import Input from '../common/Input'; -import Modal, { ModalButtons } from '../common/Modal'; +import { ExternalLink } from '../common/ExternalLink'; +import { Input } from '../common/Input'; +import { Modal, ModalButtons } from '../common/Modal'; import type { ModalProps } from '../common/Modal'; -import Text from '../common/Text'; -import View from '../common/View'; +import { Text } from '../common/Text'; +import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type SimpleFinInitialiseProps = { diff --git a/packages/desktop-client/src/hooks/useSimpleFinStatus.ts b/packages/desktop-client/src/hooks/useSimpleFinStatus.ts index 7a5852c6f92..b3f4a06fae1 100644 --- a/packages/desktop-client/src/hooks/useSimpleFinStatus.ts +++ b/packages/desktop-client/src/hooks/useSimpleFinStatus.ts @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { send } from 'loot-core/src/platform/client/fetch'; -import useSyncServerStatus from './useSyncServerStatus'; +import { useSyncServerStatus } from './useSyncServerStatus'; export function useSimpleFinStatus() { const [configuredSimpleFin, setConfiguredSimpleFin] = useState< diff --git a/packages/loot-core/src/types/models/simplefin.d.ts b/packages/loot-core/src/types/models/simplefin.d.ts index 821de80accb..5eddc6680ab 100644 --- a/packages/loot-core/src/types/models/simplefin.d.ts +++ b/packages/loot-core/src/types/models/simplefin.d.ts @@ -7,4 +7,4 @@ export type SimpleFinAccount = { id: string; name: string; org: SimpleFinOrganization; -}; \ No newline at end of file +};