Skip to content

Commit

Permalink
fix check login bug
Browse files Browse the repository at this point in the history
  • Loading branch information
druid3122 committed Jul 17, 2023
1 parent a300220 commit 2bcb769
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
window.location.reload()
// await setNetWorkChainId(selectNetworkConfig.value);
// await _fetchData();
}
};

Expand Down Expand Up @@ -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(() => {
Expand Down

0 comments on commit 2bcb769

Please sign in to comment.