From a6025676c740cad3b01c98fdd450ebc395150218 Mon Sep 17 00:00:00 2001 From: Jip Stavenuiter Date: Fri, 1 Dec 2023 16:38:19 +0100 Subject: [PATCH] Bugfix/add override chain id for plasmit editing (#1205) * add override chain id functionality for plasmic editing * add override chain id to effect dependencies --- frontend/hooks/hypercerts-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/hooks/hypercerts-client.ts b/frontend/hooks/hypercerts-client.ts index 2defcd2c..4ca52dda 100644 --- a/frontend/hooks/hypercerts-client.ts +++ b/frontend/hooks/hypercerts-client.ts @@ -11,7 +11,7 @@ export const useHypercertClient = ({ } = {}) => { const { chain } = useNetwork(); const clientConfig = { - chain, + chain: overrideChainId ? { id: overrideChainId } : chain, nftStorageToken: NFT_STORAGE_TOKEN, web3StorageToken: WEB3_STORAGE_TOKEN, }; @@ -49,7 +49,7 @@ export const useHypercertClient = ({ } setIsLoading(false); - }, [chain?.id, walletClient, walletClientLoading]); + }, [chain?.id, overrideChainId, walletClient, walletClientLoading]); return { client, isLoading }; };