File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed 
typescript/widgets/src/walletIntegrations Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1+ --- 
2+ " @hyperlane-xyz/widgets "  : minor 
3+ --- 
4+ 
5+ Add optional callback for when protocol is selected in MultiProtocolWalletModal
Original file line number Diff line number Diff line change @@ -11,16 +11,19 @@ export function MultiProtocolWalletModal({
1111  isOpen, 
1212  close, 
1313  protocols, 
14+   onProtocolSelected, 
1415} : { 
1516  isOpen : boolean ; 
1617  close : ( )  =>  void ; 
1718  protocols ?: ProtocolType [ ] ;  // defaults to all protocols if not provided 
19+   onProtocolSelected ?: ( protocol : ProtocolType )  =>  void ; 
1820} )  { 
1921  const  connectFns  =  useConnectFns ( ) ; 
2022
2123  const  onClickProtocol  =  ( protocol : ProtocolType )  =>  { 
2224    close ( ) ; 
2325    const  connectFn  =  connectFns [ protocol ] ; 
26+     if  ( onProtocolSelected )  onProtocolSelected ( protocol ) ; 
2427    if  ( connectFn )  connectFn ( ) ; 
2528  } ; 
2629
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments