diff --git a/demo/vite-react-app-solana/package-lock.json b/demo/vite-react-app-solana/package-lock.json index 68e5f97e5..055ff77c2 100644 --- a/demo/vite-react-app-solana/package-lock.json +++ b/demo/vite-react-app-solana/package-lock.json @@ -27,13 +27,13 @@ }, "../../packages/modal": { "name": "@web3auth/modal", - "version": "11.0.0-beta.2", + "version": "11.0.1", "dependencies": { "@hcaptcha/react-hcaptcha": "^2.0.2", - "@toruslabs/base-controllers": "^9.8.0", + "@toruslabs/base-controllers": "^9.10.0", "@toruslabs/http-helpers": "^9.0.0", - "@web3auth/auth": "^11.8.0", - "@web3auth/no-modal": "^11.0.0-beta.2", + "@web3auth/auth": "^11.8.1", + "@web3auth/no-modal": "^11.0.1", "@web3auth/ws-embed": "^6.0.4", "bowser": "^2.14.1", "classnames": "^2.5.1", @@ -43,44 +43,44 @@ "deepmerge": "^4.3.1", "i18next": "^25.10.9", "react-i18next": "^16.6.6", - "react-qrcode-logo": "^4.0.0", - "tailwind-merge": "^3.5.0", - "vitest": "^4.1.5" + "react-qrcode-logo": "^4.1.0", + "tailwind-merge": "^3.6.0", + "vitest": "^4.1.8" }, "devDependencies": { - "@babel/preset-react": "^7.28.5", + "@babel/preset-react": "^7.29.7", "@coinbase/wallet-sdk": "^4.3.7", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-replace": "^6.0.3", "@rollup/plugin-url": "^8.0.2", "@solana/client": "^1.7.0", - "@solana/kit": "^6.8.0", + "@solana/kit": "^6.9.0", "@svgr/rollup": "^8.1.0", "@svgr/webpack": "^8.1.0", - "@tailwindcss/postcss": "^4.2.4", - "@toruslabs/eslint-config-react": "^5.0.1", - "@toruslabs/eslint-config-vue": "^5.0.1", + "@tailwindcss/postcss": "^4.3.0", + "@toruslabs/eslint-config-react": "^5.0.2", + "@toruslabs/eslint-config-vue": "^5.0.2", "@toruslabs/isomorphic-style-loader": "^5.4.0", "@toruslabs/vue-components": "^9.0.1", - "@types/react": "^19.2.14", + "@types/react": "^19.2.16", "@types/react-dom": "^19.2.3", - "@wagmi/core": "^3.4.7", - "@wagmi/vue": "^0.5.9", + "@wagmi/core": "^3.5.0", + "@wagmi/vue": "^0.5.17", "css-loader": "^7.1.4", "live-server": "^1.2.2", - "postcss": "^8.5.12", + "postcss": "^8.5.15", "postcss-loader": "^8.2.1", "postcss-prefix-selector": "^2.1.1", - "react": "^19.2.5", - "react-dom": "^19.2.5", + "react": "^19.2.7", + "react-dom": "^19.2.7", "rollup-plugin-postcss": "^4.0.2", "rollup-preserve-directives": "^1.1.3", "style-loader": "^4.0.0", - "tailwindcss": "^4.2.4", + "tailwindcss": "^4.3.0", "url-loader": "^4.1.1", - "viem": "^2.48.4", - "vue": "^3.5.33", - "wagmi": "^3.6.8" + "viem": "^2.52.0", + "vue": "^3.5.35", + "wagmi": "^3.6.16" }, "engines": { "node": ">=22.x", diff --git a/demo/vue-app-new/src/components/AppDashboard.vue b/demo/vue-app-new/src/components/AppDashboard.vue index b804971ca..36441d27a 100644 --- a/demo/vue-app-new/src/components/AppDashboard.vue +++ b/demo/vue-app-new/src/components/AppDashboard.vue @@ -17,7 +17,15 @@ import { CONNECTOR_INITIAL_AUTHENTICATION_MODE } from "@web3auth/no-modal"; import { useI18n } from "petite-vue-i18n"; import { useSignMessage as useSolanaSignMessage, useSolanaWallet, useSolanaClient } from "@web3auth/modal/vue/solana"; -import { useConnection, useBalance, useSignMessage, useSignTypedData, useSwitchChain as useWagmiSwitchChain, useConfig } from "@wagmi/vue"; +import { + useConnection, + useBalance, + useSignMessage, + useSignTypedData, + useSwitchChain as useWagmiSwitchChain, + useConfig, + useChainId, +} from "@wagmi/vue"; import { getCapabilities, getCallsStatus, sendCalls, showCallsStatus } from "@wagmi/core"; import { parseEther } from "viem"; import { createWalletTransactionSigner, toAddress } from "@solana/client"; @@ -28,6 +36,7 @@ import AccountLinkingSection from "./AccountLinkingSection.vue"; import X402Tester from "./X402Tester.vue"; import { getPrivateKey, sendEth, sendEthWithSmartAccount, signTransaction as signEthTransaction } from "../services/ethHandlers"; import { formDataStore } from "../store/form"; +import { numberToHex } from "viem/utils"; const { t } = useI18n({ useScope: "global" }); @@ -38,7 +47,7 @@ const { loading: userInfoLoading, getUserInfo } = useWeb3AuthUser(); const { enableMFA } = useEnableMFA(); const { manageMFA } = useManageMFA(); const { mutateAsync: switchChainAsync } = useWagmiSwitchChain(); - +const wagmiConnectedChainId = useChainId(); const { showWalletUI, loading: showWalletUILoading } = useWalletUI(); const { showWalletConnectScanner, loading: showWalletConnectScannerLoading } = useWalletConnectScanner(); const { showCheckout, loading: showCheckoutLoading } = useCheckout(); @@ -174,7 +183,10 @@ const onGetPrivateKey = async () => { }; const getConnectedChainId = async () => { - printToConsole("chainId", web3Auth.value?.currentChain?.chainId); + printToConsole("chainId", { + web3AuthChainId: web3Auth.value?.currentChain?.chainId, + wagmiChainId: numberToHex(wagmiConnectedChainId.value), + }); }; const onGetBalance = async () => { @@ -375,7 +387,6 @@ const canSwitchChainNamespace = computed(() => { }); const onSwitchChain = async () => { - log.info("switching chain"); try { const chainId = connection.value?.ethereumProvider?.chainId; if (!chainId) throw new Error("No ethereum provider chainId"); @@ -383,6 +394,7 @@ const onSwitchChain = async () => { const newChain = eip155Chains.value.find((c) => c.chainId !== chainId); if (!newChain) throw new Error("Please configure at least 2 EVM chains in the config"); + log.info("switching chain", newChain.chainId); const data = await switchChainAsync({ chainId: Number(newChain.chainId) }); printToConsole("switchedChain", { chainId: data.id }); } catch (error) { @@ -429,7 +441,7 @@ const onSwitchChainNamespace = async () => { {{ $t("app.buttons.btnClearConsole") }} -