Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How can I detect change in account in Metamask?

window.ethereum.on('accountsChanged', function (accounts) {
  // Time to reload your interface with accounts[0]!
})
Source by ethereum.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #How #I #detect #change #account
ADD COMMENT
Topic
Name
5+4 =