1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-29 00:57:50 +02:00

check if config is null (#1276)

This commit is contained in:
Norbi 2022-03-29 18:18:13 +03:00 committed by GitHub
parent f4a0376f99
commit 905be83a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ function useNftFactory(): NftFactory {
useEffect(() => {
if (!web3 || !chainId) return
const config = getOceanConfig(chainId)
const factory = new NftFactory(config.erc721FactoryAddress, web3)
const factory = new NftFactory(config?.erc721FactoryAddress, web3)
setNftFactory(factory)
}, [web3, chainId])