Event emitted upon connecting to a dapp.
interface connectionInfo {
  chainId: string;
}

window.ethereum.on('connect', (connectionInfo: connectionInfo) => {
      console.log(connectionInfo.chainId);
      // "0x1" On Ethereum
});
You can see an example of hooking into this event in our sandbox.