mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Default to not showing unsupported network message when no wallet is connected
This commit is contained in:
parent
bfba30fe9d
commit
faf9be8d3a
@ -110,7 +110,7 @@ function Web3Provider({ children }: { children: ReactNode }): ReactElement {
|
||||
ocean: '0'
|
||||
})
|
||||
const [isSupportedOceanNetwork, setIsSupportedOceanNetwork] =
|
||||
useState<boolean>()
|
||||
useState<boolean>(true)
|
||||
|
||||
// -----------------------------------
|
||||
// Helper: connect to web3
|
||||
@ -316,10 +316,10 @@ function Web3Provider({ children }: { children: ReactNode }): ReactElement {
|
||||
useEffect(() => {
|
||||
if (appConfig.chainIdsSupported.includes(networkId)) {
|
||||
setIsSupportedOceanNetwork(true)
|
||||
} else {
|
||||
} else if (accountId) {
|
||||
setIsSupportedOceanNetwork(false)
|
||||
}
|
||||
}, [networkId, appConfig])
|
||||
}, [accountId, networkId, appConfig])
|
||||
|
||||
// -----------------------------------
|
||||
// Handle change events
|
||||
|
Loading…
Reference in New Issue
Block a user