diff --git a/package.json b/package.json index 7ca37f9..71985c7 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@emotion/styled": "^11.10.4", "@hcaptcha/react-hcaptcha": "^1.4.4", "@mui/material": "^5.10.7", - "@nulink_network/nulink-web-agent-access-sdk": "^0.1.8", + "@nulink_network/nulink-web-agent-access-sdk": "^0.2.0", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^12.0.0", "@testing-library/user-event": "^13.2.1", diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index da300fd..85bea71 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -64,13 +64,13 @@ export const Header = ({ setLoginUser, setLoginStatus }) => { const _changeNetwork = async () => { if (selectNetworkConfig && selectNetworkConfig.key) { setShowConfirmTipModal(false); - localStorage.setItem( + /*localStorage.setItem( "nulink_agent_react_chain_id", selectNetworkConfig.value, ); - window.location.reload(); - // await setNetWorkChainId(selectNetworkConfig.value); - // await _fetchData(); + window.location.reload()*/ + await setNetWorkChainId(selectNetworkConfig.value); + window.location.reload() } }; @@ -125,8 +125,8 @@ export const Header = ({ setLoginUser, setLoginStatus }) => { }; const _fetchData = async () => { - // setChainID(await getNetWorkChainId()); - setChainID(Number(localStorage.getItem("nulink_agent_react_chain_id"))); + setChainID(await getNetWorkChainId()); + //setChainID(Number(localStorage.getItem("nulink_agent_react_chain_id"))); }; useEffect(() => {