From d1315e79120a631eda99c4510a2f5ec4c6fd2a86 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 14 Mar 2024 11:53:03 +0000 Subject: [PATCH] web3-api update --- src/features/Web3/hooks/useFetchTokens/useFetchTokens.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/features/Web3/hooks/useFetchTokens/useFetchTokens.tsx b/src/features/Web3/hooks/useFetchTokens/useFetchTokens.tsx index 88b33702..be1d84a9 100644 --- a/src/features/Web3/hooks/useFetchTokens/useFetchTokens.tsx +++ b/src/features/Web3/hooks/useFetchTokens/useFetchTokens.tsx @@ -12,6 +12,7 @@ const apiUrl = import.meta.env.PUBLIC_WEB3_API_URL export function useFetchTokens(): SWRResponse { const chainId = useChainId() const { address } = useAccount() + // const { chains } = useConfig() const [url, setUrl] = useState() @@ -25,7 +26,8 @@ export function useFetchTokens(): SWRResponse { return } - const url = `${apiUrl}/balance?address=${address}&chainId=${chainId}` + // const chainIds = chains.map((chain) => chain.id).join(',') + const url = `${apiUrl}/balance?address=${address}&chainIds=${chainId}` setUrl(url) }, [address, chainId])