Skip to content

Commit

Permalink
Typecheck cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwhelchel committed Jan 11, 2024
1 parent 78c232e commit 80e6c68
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { View } from '../common/View';
type CreateAccountProps = {
modalProps: CommonModalProps;
syncServerStatus: SyncServerStatus;
upgradingAccountId?: string;
};

export function CreateAccount({
Expand Down Expand Up @@ -47,6 +48,13 @@ export function CreateAccount({
}
};

type NormalizedAccount = {

Check warning on line 51 in packages/desktop-client/src/components/modals/CreateAccount.tsx

View workflow job for this annotation

GitHub Actions / lint

'NormalizedAccount' is defined but never used. Allowed unused vars must match /^_/u
account_id: string;
name: string;
institution: string;
orgDomain: string;
};

const onConnectSimpleFin = async () => {
if (!isSimpleFinSetupComplete) {
onSimpleFinInit();
Expand Down
10 changes: 10 additions & 0 deletions packages/loot-core/src/types/models/simplefin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export type SimpleFinOrganization = {
name: string;
domain: string;
};

export type SimpleFinAccount = {
id: string;
name: string;
org: SimpleFinOrganization;
};

Check warning on line 10 in packages/loot-core/src/types/models/simplefin.d.ts

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎`
3 changes: 2 additions & 1 deletion packages/loot-core/src/types/server-handlers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CategoryGroupEntity,
GoCardlessToken,
GoCardlessInstitution,
SimpleFinAccount,
PayeeEntity,
} from './models';
import { EmptyObject } from './util';
Expand Down Expand Up @@ -223,7 +224,7 @@ export interface ServerHandlers {

'simplefin-status': () => Promise<{ configured: boolean }>;

'simplefin-accounts': () => Promise<{ configured: boolean }>;
'simplefin-accounts': () => Promise<{ accounts: SimpleFinAccount[] }>;

'gocardless-get-banks': (country: string) => Promise<{
data: GoCardlessInstitution[];
Expand Down
2 changes: 1 addition & 1 deletion upcoming-release-notes/2188.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ category: Enhancements
authors: [zachwhelchel,duplaja,lancepick,latetedemelon]
---

Add option to link an account to SimpleFIN for syncing transactions.
Add option to link an account with SimpleFIN for syncing transactions.

0 comments on commit 80e6c68

Please sign in to comment.