How can I modify the following code so that the alert fired once?
Moralis.onAccountChanged( async (account) => {
const confirmed = confirm("Link this account?");
if (confirmed) {
await Moralis.link(account);
let user = Moralis.User.current();
console.log("new account ethAddress: ", user.get("ethAddress"));
}
});
Thanks in advance.