manually connect accountsChanged
gpersoon opened this issue · comments
Describe the bug
The callback for accountsChanged isn't called when you mannually connect a account
Steps to reproduce
- Have a website that contains the following piece of code:
ethereum.on('accountsChanged', newActs)
async function newActs() {
var acts=await web3.eth.getAccounts()
console.log(`We have accounts: ${JSON.stringify(acts)}`);
}
-
manually disconnect all accounts within metamask:
Then you see updates that the account is disconnected.
Finally you end up with [] (e.g. no accounts connected) -
manually connect an account (via .../ connected sites / manually connect to current site / next / connect)
Now nothing happens (e.g. no callback of accountsChanged)
Expected behavior
I would expect a callback of accountsChanged because we indeed have a new account
Browser details
- OS Windows 10
- Browser: Chrome Version 87.0.4280.66 (Official Build) (64-bit) (same occurs on firefox)
- Metamask Version 8.1.3
I have confirmed that this is reproducible on develop