Skip to content

Commit

Permalink
Merge branch 'main' of github.com:NuLink-network/nulink-web-agent-int…
Browse files Browse the repository at this point in the history
…egration-demo
  • Loading branch information
nu_link committed Jul 22, 2023
2 parents 1e5b4eb + 2bcb769 commit aa035ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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
12 changes: 6 additions & 6 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);
// await _fetchData();
window.location.reload()*/
await setNetWorkChainId(selectNetworkConfig.value);
window.location.reload()
}
};

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 aa035ed

Please sign in to comment.