From 22eac3a0bad6bb0b75c60366897692c06bc2f525 Mon Sep 17 00:00:00 2001 From: stonega Date: Tue, 2 Jul 2024 16:02:33 +0800 Subject: [PATCH] Use web3modal to connect wallet --- package.json | 10 +- src/App.vue | 65 +- src/components/Contract.vue | 12 +- src/components/ContractHd.vue | 8 +- src/components/ContractInfo.vue | 5 +- src/components/ContractMsg.vue | 9 +- src/components/Nav.vue | 22 +- src/hooks/useIsActivating.js | 28 +- src/hooks/useNetwork.js | 27 +- yarn.lock | 1835 ++++++++++++++++++++++++++++++- 10 files changed, 1899 insertions(+), 122 deletions(-) diff --git a/package.json b/package.json index 1f9fafa..0a8f120 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,12 @@ "@types/node": "^20.12.6", "@uiw/codemirror-theme-vscode": "^4.20.2", "@vitejs/plugin-vue-jsx": "^3.1.0", + "@web3modal/ethers5": "^5.0.3", "axios": "^1.2.0", "codemirror": "^6.0.1", "core-js": "^3.6.5", "ethereum-blockies-base64": "^1.0.2", - "ethers": "^5.7.2", + "ethers": "5.7.2", "fundebug-javascript": "^2.8.8", "fundebug-revideo": "^0.8.0", "fundebug-vue": "^0.3.6", @@ -43,5 +44,10 @@ "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", "vite": "^5.2.0" - } + }, + "optionalDependencies": { + "react": ">=17", + "react-dom": ">=17" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/App.vue b/src/App.vue index f95068b..6d87836 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,40 +11,49 @@