How would I detect in my web app that a user has disconnected their wallet? I am using vanilla js and this function to connect.
user = await Moralis
.authenticate({signingMessage: "Log in"})
.then(function (user) {
console.log("logged in user:", user);
console.log(user.get("ethAddress"));
userAddress = user.get("ethAddress");
currentUserWallet = user.get("ethAddress");
$("#app").fadeIn(500);
})
.catch(function (error) {
console.log(error);
});