diff --git a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx index 8f62089c913..6ba131bf6dd 100644 --- a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx @@ -1,5 +1,5 @@ -// @ts-strict-ignore -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect, useState } from 'react'; +import { DialogTrigger } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; @@ -30,13 +30,12 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { const { t } = useTranslation(); const syncServerStatus = useSyncServerStatus(); const dispatch = useDispatch(); - const [isGoCardlessSetupComplete, setIsGoCardlessSetupComplete] = - useState(null); - const [isSimpleFinSetupComplete, setIsSimpleFinSetupComplete] = - useState(null); - const [menuGoCardlessOpen, setGoCardlessMenuOpen] = useState(false); - const triggerRef = useRef(null); - const [menuSimplefinOpen, setSimplefinMenuOpen] = useState(false); + const [isGoCardlessSetupComplete, setIsGoCardlessSetupComplete] = useState< + boolean | null + >(null); + const [isSimpleFinSetupComplete, setIsSimpleFinSetupComplete] = useState< + boolean | null + >(null); const onConnectGoCardless = () => { if (!isGoCardlessSetupComplete) { @@ -139,7 +138,6 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { value: null, }).then(() => { setIsGoCardlessSetupComplete(false); - setGoCardlessMenuOpen(false); }); }); }; @@ -154,7 +152,6 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { value: null, }).then(() => { setIsSimpleFinSetupComplete(false); - setSimplefinMenuOpen(false); }); }); }; @@ -248,12 +245,10 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { : t('Set up GoCardless for bank sync')} {isGoCardlessSetupComplete && ( - <> + - setGoCardlessMenuOpen(false)} - > + { if (item === 'reconfigure') { @@ -281,7 +272,7 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { ]} /> - + )} @@ -317,24 +308,15 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { : t('Set up SimpleFIN for bank sync')} {isSimpleFinSetupComplete && ( - <> - - setSimplefinMenuOpen(false)} - > + { if (item === 'reconfigure') { @@ -349,7 +331,7 @@ export function CreateAccountModal({ upgradingAccountId }: CreateAccountProps) { ]} /> - + )} diff --git a/packages/loot-core/src/types/server-handlers.d.ts b/packages/loot-core/src/types/server-handlers.d.ts index 4afbc72a3e8..657244b3cc5 100644 --- a/packages/loot-core/src/types/server-handlers.d.ts +++ b/packages/loot-core/src/types/server-handlers.d.ts @@ -178,7 +178,7 @@ export interface ServerHandlers { 'account-move': (arg: { id; targetId }) => Promise; - 'secret-set': (arg: { name: string; value: string }) => Promise; + 'secret-set': (arg: { name: string; value: string | null }) => Promise; 'secret-check': (arg: string) => Promise; 'gocardless-poll-web-token': (arg: { diff --git a/upcoming-release-notes/3942.md b/upcoming-release-notes/3942.md new file mode 100644 index 00000000000..c66d2b9326b --- /dev/null +++ b/upcoming-release-notes/3942.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [MatissJanis] +--- + +Fix misaligned gocardless credential popover.