mirror of
https://github.com/oceanprotocol/react.git
synced 2024-12-24 01:56:21 +01:00
networkChanged → chainChanged
This commit is contained in:
parent
fd1e4f0a57
commit
bccff55abe
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user