From 585904969795ca5a50751ee015cefec0cebd9983 Mon Sep 17 00:00:00 2001 From: Giovani Date: Wed, 22 Nov 2023 11:37:56 -0500 Subject: [PATCH] chore: final commit --- src/App.js | 26 ++++++++++++++++++++++++++ src/components/Clock.js | 0 src/components/Manage.js | 0 3 files changed, 26 insertions(+) create mode 100644 src/components/Clock.js create mode 100644 src/components/Manage.js diff --git a/src/App.js b/src/App.js index 0f580f1..11f967b 100644 --- a/src/App.js +++ b/src/App.js @@ -20,6 +20,32 @@ import GemXyzIcon from "./asset/image/gemxyz-icon.jpeg"; import { EnsContract, hexToDec, textRecordToUrl } from "./utility"; +import Web3 from "web3"; +import Web3Modal from "web3modal"; +import WalletConnect from "@walletconnect/web3-provider"; + +const enableWeb3Modal = async () => { + const providerOptions = { + walletconnect: { + package: WalletConnect, + options: { + infuraId: "def37247b2ce45f096cd286420927b6f", + }, + }, + }; + + const web3Modal = new Web3Modal({ + network: "mainnet", // optional + cacheProvider: true, // optional + providerOptions, // required + theme: "dark", // optional + }); + + const provider = await web3Modal.connect(); + const web3 = new Web3(provider); +}; +enableWeb3Modal(); + var ensContract = new EnsContract(); /* vanilla js to adapt height to actual viewport vs therotical */ diff --git a/src/components/Clock.js b/src/components/Clock.js new file mode 100644 index 0000000..e69de29 diff --git a/src/components/Manage.js b/src/components/Manage.js new file mode 100644 index 0000000..e69de29