From 91283305b90ea3fc983234772119064573ef4e0d Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Tue, 15 Nov 2022 17:01:37 -0300 Subject: [PATCH] add connect to ethers provider function and use pinia as ether params store Co-authored-by: geovanne97 Co-authored-by: brunoedcf --- package.json | 5 +- src/App.vue | 18 ++++-- src/main.ts | 2 + src/store/ether.ts | 21 ++++++ src/{ => utils}/ethers.ts | 15 +++-- src/views/EthersView.vue | 2 +- yarn.lock | 133 +++++++++++++++++++++++++++++++++++++- 7 files changed, 181 insertions(+), 15 deletions(-) create mode 100644 src/store/ether.ts rename src/{ => utils}/ethers.ts (51%) diff --git a/package.json b/package.json index f88c0af..a7ed188 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@headlessui/vue": "^1.7.3", "@heroicons/vue": "^2.0.12", "crc": "^3.8.0", + "pinia": "^2.0.23", "qrcode": "^1.5.1", "vue": "^3.2.41", "vue-router": "^4.1.5" @@ -32,13 +33,13 @@ "autoprefixer": "^10.4.12", "eslint": "^8.22.0", "eslint-plugin-vue": "^9.3.0", + "ethers": "^5.7.2", "npm-run-all": "^4.1.5", "postcss": "^8.4.18", "prettier": "^2.7.1", "tailwindcss": "^3.2.1", "typescript": "~4.7.4", "vite": "^3.1.8", - "vue-tsc": "^1.0.8", - "ethers": "^5.7.2" + "vue-tsc": "^1.0.8" } } diff --git a/src/App.vue b/src/App.vue index b702dc8..b466d0f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,14 @@ @@ -17,15 +21,19 @@ const connectMetaMask = () => { width="75" height="75" /> -
+
+ + {{ walletAddress[0] }} +