From ebecb99a55736a54632e2e1d141a9bbebad56b98 Mon Sep 17 00:00:00 2001 From: BenRey Date: Fri, 20 Dec 2024 16:15:45 +0100 Subject: [PATCH] update dependencies and enhance useInit hook to include currentWallet --- front/package-lock.json | 12 ++++++------ front/src/hooks/useInit.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/front/package-lock.json b/front/package-lock.json index 87c92c5..b867930 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -1761,9 +1761,9 @@ } }, "node_modules/@massalabs/react-ui-kit": { - "version": "1.0.1-dev.20241219145708", - "resolved": "https://registry.npmjs.org/@massalabs/react-ui-kit/-/react-ui-kit-1.0.1-dev.20241219145708.tgz", - "integrity": "sha512-1N4QZcyWYb3xyATIcMgoAyGkvFbq+iXagmlA9+JuXIhL1oEePa4O/mbTxq/ZyH8zt/q611NoJ5TYoVdzN+2Lcg==", + "version": "1.0.1-dev.20241220151114", + "resolved": "https://registry.npmjs.org/@massalabs/react-ui-kit/-/react-ui-kit-1.0.1-dev.20241220151114.tgz", + "integrity": "sha512-//lA8f4v21wrVUyPxcltVzfyXr6bKcNwvA8ZtQ6d1g8DNML4T0HqYnfBpSluwLGvpvt4rM/xosBb8yCFg2vqcw==", "dependencies": { "@headlessui/react": "^1.7.15", "@massalabs/massa-web3": "^5.0.1-dev", @@ -2298,9 +2298,9 @@ } }, "node_modules/@massalabs/wallet-provider": { - "version": "3.0.1-dev.20241219125941", - "resolved": "https://registry.npmjs.org/@massalabs/wallet-provider/-/wallet-provider-3.0.1-dev.20241219125941.tgz", - "integrity": "sha512-lxI9XhZpcZx2pt85m3AP5c9n/9+Zpwjh3uCd7u+/QvcgWr3JuAohdPo1O8hFZnc6xIKFqa/xlpmWPmQ6/H4bGA==", + "version": "3.0.1-dev.20241220142101", + "resolved": "https://registry.npmjs.org/@massalabs/wallet-provider/-/wallet-provider-3.0.1-dev.20241220142101.tgz", + "integrity": "sha512-EfDb364VD5Pyv6NhndJed6CHt/Q8bT3eEpdBqmpJ+Fsg4KAdaQLY59LbBStCHqImS8tpBuAJMZ9aZKy+CgvW0Q==", "license": "(MIT AND Apache-2.0)", "dependencies": { "@hicaru/bearby.js": "^0.5.9", diff --git a/front/src/hooks/useInit.ts b/front/src/hooks/useInit.ts index f614658..254f8cc 100644 --- a/front/src/hooks/useInit.ts +++ b/front/src/hooks/useInit.ts @@ -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(); @@ -23,7 +27,7 @@ export const useInit = () => { } initApp(connectedAccount, walletNetwork.name); } - }, [connectedAccount, walletNetwork]); + }, [connectedAccount, walletNetwork, currentWallet]); useEffect(() => { return () => {