1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-23 01:36:47 +02:00

fix opcFees before data is present (#1353)

This commit is contained in:
Matthias Kretschmann 2022-04-22 11:29:37 +02:00 committed by GitHub
parent 97e0921e1e
commit e77dcaf60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ function MarketMetadataProvider({
const getOpcFeeForToken = useCallback(
(tokenAddress: string, chainId: number): string => {
if (!opcFees) return
if (!opcFees) return '0'
const opc = opcFees.filter((x) => x.chainId === chainId)[0]
const isTokenApproved = opc.approvedTokens.includes(tokenAddress)