-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Organize Plaid env variables for development and sandbox envs (#480
- Loading branch information
Showing
10 changed files
with
33 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
packages/webapp/src/containers/CashFlow/ConnectBankDialog/ConnectBankDialog.tsx
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
packages/webapp/src/containers/CashFlow/ConnectBankDialog/ConnectBankDialogBody.tsx
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
packages/webapp/src/containers/CashFlow/ConnectBankDialog/ConnectBankDialogContent.tsx
This file was deleted.
Oops, something went wrong.
72 changes: 0 additions & 72 deletions
72
packages/webapp/src/containers/CashFlow/ConnectBankDialog/ConnectBankServiceCard.tsx
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/webapp/src/containers/CashFlow/ConnectBankDialog/index.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useCallback } from 'react'; | ||
import { useSetBankingPlaidToken } from '../state/banking'; | ||
import { AppToaster } from '@/components'; | ||
import { useGetPlaidLinkToken } from '../query'; | ||
import { Intent } from '@blueprintjs/core'; | ||
|
||
export const useOpenPlaidConnect = () => { | ||
const { mutateAsync: getPlaidLinkToken, isLoading } = useGetPlaidLinkToken(); | ||
const setPlaidId = useSetBankingPlaidToken(); | ||
|
||
const openPlaidAsync = useCallback(() => { | ||
return getPlaidLinkToken() | ||
.then((res) => { | ||
setPlaidId(res.data.link_token); | ||
}) | ||
.catch(() => { | ||
AppToaster.show({ | ||
message: 'Something went wrong.', | ||
intent: Intent.DANGER, | ||
}); | ||
}); | ||
}, [getPlaidLinkToken, setPlaidId]); | ||
|
||
return { openPlaidAsync, isPlaidLoading: isLoading }; | ||
}; |