Skip to content

Commit

Permalink
fix(TransactionsImport): remove unwated plaid option
Browse files Browse the repository at this point in the history
That was merged by mistake in #11008
  • Loading branch information
Betree committed Feb 24, 2025
1 parent d42b6d3 commit 628e5e3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lib/hooks/usePlaidConnectDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ const generatePlaidLinkTokenMutation = gql`
$host: AccountReferenceInput!
$transactionImport: TransactionsImportReferenceInput
$locale: Locale
$accountSelectionEnabled: Boolean
) {
generatePlaidLinkToken(
host: $host
transactionImport: $transactionImport
locale: $locale
accountSelectionEnabled: $accountSelectionEnabled
) {
generatePlaidLinkToken(host: $host, transactionImport: $transactionImport, locale: $locale) {
linkToken
expiration
requestId
Expand Down Expand Up @@ -64,15 +58,13 @@ export const usePlaidConnectDialog = ({
disabled,
onOpen,
transactionImportId,
accountSelectionEnabled,
}: {
host: Host;
onConnectSuccess?: (result: ConnectPlaidAccountMutation['connectPlaidAccount']) => void;
onUpdateSuccess?: () => void;
disabled?: boolean;
onOpen?: () => void;
transactionImportId?: string;
accountSelectionEnabled?: boolean;
}): {
status: PlaidDialogStatus;
show: () => void;
Expand Down Expand Up @@ -141,15 +133,14 @@ export const usePlaidConnectDialog = ({
host: getAccountReferenceInput(host),
transactionImport: transactionImportId ? { id: transactionImportId } : undefined,
locale: intl.locale,
accountSelectionEnabled,
},
}); // The process will continue when the `React.useEffect` below detects the token
} catch (error) {
toast({ variant: 'error', message: i18nGraphqlException(intl, error) });
setStatus('idle');
}
}
}, [intl, status, generatePlaidToken, toast, host, transactionImportId, accountSelectionEnabled]);
}, [intl, status, generatePlaidToken, toast, host, transactionImportId]);

React.useEffect(() => {
if (ready && linkToken) {
Expand Down

0 comments on commit 628e5e3

Please sign in to comment.