From e77dcaf60a0269486bb4c1baf9fec7657c54b0d3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 22 Apr 2022 11:29:37 +0200 Subject: [PATCH] fix opcFees before data is present (#1353) --- src/@context/MarketMetadata/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/@context/MarketMetadata/index.tsx b/src/@context/MarketMetadata/index.tsx index 4af8136d2..85dde0450 100644 --- a/src/@context/MarketMetadata/index.tsx +++ b/src/@context/MarketMetadata/index.tsx @@ -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)