File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/app/pages/transaction-request/components/transaction-error Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
- import { memo , Suspense } from 'react' ;
1
+ import { memo , Suspense , useEffect } from 'react' ;
2
2
3
+ import { useAnalytics } from '@app/common/hooks/analytics/use-analytics' ;
3
4
import { useTransactionError } from '@app/pages/transaction-request/hooks/use-transaction-error' ;
4
5
5
6
import {
@@ -25,6 +26,15 @@ export enum TransactionErrorReason {
25
26
26
27
const TransactionErrorSuspense = memo ( ( ) => {
27
28
const reason = useTransactionError ( ) ;
29
+ const analytics = useAnalytics ( ) ;
30
+
31
+ useEffect ( ( ) => {
32
+ if ( ! reason ) return ;
33
+ void analytics . track ( 'view_transaction_signing_error' , {
34
+ reason : TransactionErrorReason [ reason ] . toLowerCase ( ) ,
35
+ } ) ;
36
+ } , [ analytics , reason ] ) ;
37
+
28
38
if ( ! reason ) return null ;
29
39
30
40
switch ( reason ) {
You can’t perform that action at this time.
0 commit comments