From 33b2ff2adfb37696b0b7643131a4985c0e0c74a3 Mon Sep 17 00:00:00 2001 From: Nivesh Saharan Date: Mon, 25 Apr 2022 18:15:18 +0530 Subject: [PATCH] Fix Network selection from Cached session(#4) --- src/components/Body/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Body/index.tsx b/src/components/Body/index.tsx index b39dcc2..5d5d133 100644 --- a/src/components/Body/index.tsx +++ b/src/components/Body/index.tsx @@ -121,9 +121,9 @@ function Body() { setUri(_connector.uri); setPeerMeta(_connector.peerMeta); setIsConnected(true); - const chainId = (_connector.chainId as unknown as { chainID: number }) - .chainID; + .chainID || _connector.chainId; + for (let i = 0; i < networkInfo.length; i++) { if (getChainId(i) === chainId) { setNetworkIndex(i);