Fix Network selection from Cached session(#4)

This commit is contained in:
Nivesh Saharan
2022-04-25 18:15:18 +05:30
committed by GitHub
parent a14d19515f
commit 33b2ff2adf

View File

@@ -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);