File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed 
packages/sdk/src/provider Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11import  {  MetaMaskInpageProvider  }  from  '@metamask/providers' ; 
2- import  {  TrackingEvents  }  from  '@metamask/sdk-communication-layer' ; 
2+ import  { 
3+   isAnalyticsTrackedRpcMethod , 
4+   TrackingEvents , 
5+ }  from  '@metamask/sdk-communication-layer' ; 
6+ import  {  analytics  }  from  '@metamask/sdk-analytics' ; 
37
48import  {  lcAnalyticsRPCs ,  RPC_METHODS  }  from  '../config' ; 
59import  {  MetaMaskSDK  }  from  '../sdk' ; 
@@ -48,6 +52,10 @@ export const wrapExtensionProvider = ({
4852            } ) ; 
4953          } 
5054
55+           if  ( isAnalyticsTrackedRpcMethod ( method ) )  { 
56+             analytics . track ( 'sdk_action_requested' ,  {  action : method  } ) ; 
57+           } 
58+ 
5159          if  ( method  ===  RPC_METHODS . METAMASK_BATCH  &&  Array . isArray ( params ) )  { 
5260            return  handleBatchMethod ( { 
5361              target, 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments