Ethereum events vuejs

Viewed 152

in a vuejs app i am trying to connect to metamask. I can do this without problems, but I cannot get the events as specified here:

https://docs.metamask.io/guide/ethereum-provider.html#events

How can I access this event?

ethereum.on('accountsChanged', handleAccountsChanged);

I state that in my forms I do this to recall the requests for ethereum:

const { ethereum } = window;
await ethereum.request({ method: 'eth_requestAccounts' });

I was also reading about EventEmitters, but I don’t know how to use them.

I hope I was clear enough, otherwise I apologize in advance. Thank you

0 Answers
Related