Hello,
I am using the event handler provided by Moralis, for example:
Moralis.Web3.onAccountsChanged(async function (accounts) {
const confirmed = confirm('Link this address to your account?');
if (confirmed) {
await Moralis.Web3.link(accounts[0]);
alert('Address added!');
}
});
My question is: how to we disconnect from the event (onAccountsChanged
in the case of the sample above) once we do not want to listen any more?
I have not been able to find an function like off
or disconnect
.
Thanks,
Gerald