Skip to content

Commit

Permalink
chore(evm): add bridge exception capture tracking (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Jun 12, 2024
1 parent af04494 commit 3c69a4f
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useAccount } from '@gobob/wagmi';
import { Flex, FlexProps } from '@gobob/ui';
import { useMemo } from 'react';
import { getWithdrawals } from 'viem/op-stack';
import * as Sentry from '@sentry/react';

import { usePublicClientL1, usePublicClientL2, useWalletClientL1, useWalletClientL2 } from '../../../../hooks';
import { bridgeKeys } from '../../../../lib/react-query';
Expand Down Expand Up @@ -59,7 +60,10 @@ const WithdrawStatus = ({ data, isExpanded }: WithdrawStatusProps): JSX.Element
toast.success(`Successfully submitted ${data?.hash} proof`);
refetchBridgeTxs();
},
onError: () => {
onError: (e) => {
Sentry.captureException(e);
// eslint-disable-next-line no-console
console.log('Prove: ', e);
toast.error('Failed to submit proof.');
}
});
Expand Down Expand Up @@ -92,6 +96,12 @@ const WithdrawStatus = ({ data, isExpanded }: WithdrawStatusProps): JSX.Element
onSuccess: () => {
toast.success(`Successfully finalized transaction`);
refetchBridgeTxs();
},
onError: (e) => {
Sentry.captureException(e);
// eslint-disable-next-line no-console
console.log('Finalize: ', e);
toast.error('Failed to finalize.');
}
});

Expand Down

0 comments on commit 3c69a4f

Please sign in to comment.