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