I am trying to connect to metamask and detect when its connected via an event.
This initiates the connection:
await window.ethereum.send('eth_requestAccounts');
But this method is never called:
window.ethereum.on('connect', (connectInfo) => {
console.log('MetaMask Connected');
});
Am I misunderstanding when connect should be called?