Skip to content

Commit

Permalink
update dependencies and enhance useInit hook to include currentWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Rey committed Dec 20, 2024
1 parent a35ee17 commit ebecb99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 6 additions & 6 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions front/src/hooks/useInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { dappNetwork } from '@/const/network';

export const useInit = () => {
const { eventPollerStop } = useSchedulerStore();
const { connectedAccount, network: walletNetwork } = useAccountStore();
const {
connectedAccount,
network: walletNetwork,
currentWallet,
} = useAccountStore();

useAccountSync();

Expand All @@ -23,7 +27,7 @@ export const useInit = () => {
}
initApp(connectedAccount, walletNetwork.name);
}
}, [connectedAccount, walletNetwork]);
}, [connectedAccount, walletNetwork, currentWallet]);

useEffect(() => {
return () => {
Expand Down

0 comments on commit ebecb99

Please sign in to comment.