Closed gndelia closed 3 months ago
Please use chainChanged
event.
window.unisat.on('chainChanged', handler)
Due to our support for more networks, such as fractal(mainnet), testnet4(testnet), and signet(testnet), a new method is required to properly identify the current chain.
We will fix the networkChanged
event shortly, but it is not recommended to use.
Thanks for your response, I will check it - however I don't see that event listed in the docs
I tried with window.unisat.on('chainChanged', handler)
and it worked. Thanks @huanniangstudio !
In my app, I listen for both
accountsChanged
andnetworkChanged
events.I do so by running
While both used to work, today I noticed that
networkChanged
event isn't fired. Has something changed? My code detects when accounts have changed, butnetworkChanged
does not fire the handler (ever)