Skip to content

Commit

Permalink
Update App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Nov 8, 2024
1 parent 9c958ea commit b474c81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/webview/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ function App() {
}, [setState]);

useEffect(() => {
if (!client && state.account) {
if (state.account) {
setClinet(
new SuiClient({
url: getFullnodeUrl(state.account.nonce.network),
}),
);
} else {
setClinet(undefined);
}
}, [client, state]);
}, [state.account]);

return (
<>
Expand Down

0 comments on commit b474c81

Please sign in to comment.