mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
feat: add bank balance to accounts chart table
This commit is contained in:
@@ -9,7 +9,7 @@ import {
|
||||
PlaidLinkOnEventMetadata,
|
||||
PlaidLinkStableEvent,
|
||||
} from 'react-plaid-link';
|
||||
import { logEvent } from './_utils';
|
||||
import { logEvent, logExit, logSuccess } from './_utils';
|
||||
import { usePlaidExchangeToken } from '@/hooks/query';
|
||||
import { useResetBankingPlaidToken } from '@/hooks/state/banking';
|
||||
|
||||
|
||||
@@ -28,3 +28,19 @@ export const logSuccess = async ({
|
||||
link_session_id,
|
||||
});
|
||||
};
|
||||
|
||||
export const logExit = async (
|
||||
error: PlaidLinkError | null,
|
||||
{ institution, status, link_session_id, request_id }: PlaidLinkOnExitMetadata,
|
||||
) => {
|
||||
logEvent(
|
||||
'onExit',
|
||||
{
|
||||
institution,
|
||||
status,
|
||||
link_session_id,
|
||||
request_id,
|
||||
},
|
||||
error,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user