When a user changes to a different account in metamask, is there a way to detect it asynchronously in code?
I currently use
this.web3.eth.getAccounts((err, accs) => {
this.account = accs[0];
});
but when the account is changed, it still picks up the previous one. Refreshing the page is not a way to go. Did anyone face this and has a solution?