1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-11-23 02:00:27 +01:00

networkChanged → chainChanged

This commit is contained in:
Matthias Kretschmann 2020-07-31 11:31:13 +02:00
parent fd1e4f0a57
commit bccff55abe
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -143,7 +143,7 @@ function OceanProvider({
const handleNetworkChanged = async (networkId: string | number) => {
Logger.debug(
"Handling 'networkChanged' event with payload",
"Handling 'chainChanged' event with payload",
networkId,
status
)
@ -157,11 +157,11 @@ function OceanProvider({
if (web3Provider !== undefined && web3Provider !== null) {
web3Provider.on('accountsChanged', handleAccountsChanged)
web3Provider.on('networkChanged', handleNetworkChanged)
web3Provider.on('chainChanged', handleNetworkChanged)
return () => {
web3Provider.removeListener('accountsChanged', handleAccountsChanged)
web3Provider.removeListener('networkChanged', handleNetworkChanged)
web3Provider.removeListener('chainChanged', handleNetworkChanged)
}
}
}, [web3Modal, web3Provider])