From b4cf8135823c22e96a582f8d525e6ba14906c6a2 Mon Sep 17 00:00:00 2001 From: Omri Dan <61094771+omridan159@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:37:47 +0200 Subject: [PATCH] fix: setChainId cause a build error (#452) --- packages/sdk-react/src/MetaMaskProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk-react/src/MetaMaskProvider.tsx b/packages/sdk-react/src/MetaMaskProvider.tsx index f567b8eeb..ddf340e64 100644 --- a/packages/sdk-react/src/MetaMaskProvider.tsx +++ b/packages/sdk-react/src/MetaMaskProvider.tsx @@ -177,7 +177,7 @@ const MetaMaskProviderClient = ({ setConnected(activeProvider.isConnected()); setAccount(activeProvider.selectedAddress || undefined); setProvider(activeProvider); - setChainId(activeProvider.chainId); + setChainId(activeProvider.chainId || undefined); activeProvider.on('_initialized', onInitialized); activeProvider.on('connecting', onConnecting);