export const handleNetworkReload = async ( ) => { try { ( window as any ) . ethereum . autoRefreshOnNetworkChange = false ; ( window as any ) . ethereum . on ( "chainChanged" , ( chainId ) => { console . log ( "Current chain: " + chainId ) ; return null ; } ) ; ( window as any ) . ethereum . on ( "networkChanged" , ( networkId ) => { console . log ( "Current chain: " + networkId ) ; return null ; } ) ; } catch ( e ) { console . log ( e ) ; } } ;