Skip to content

Commit

Permalink
fix web3
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Dec 29, 2023
1 parent cf35473 commit 599f88f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"@near-wallet-selector/neth": "^8.5.0",
"@near-wallet-selector/nightly": "^8.5.0",
"@near-wallet-selector/sender": "^8.5.0",
"@web3-onboard/core": "^2.16.2",
"@web3-onboard/injected-wallets": "^2.8.4",
"@web3-onboard/ledger": "^2.4.4",
"@web3-onboard/react": "^2.7.2",
"@web3-onboard/walletconnect": "^2.3.5",
"@web3-onboard/core": "^2.20.2",
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/ledger": "^2.4.6",
"@web3-onboard/react": "^2.8.7",
"@web3-onboard/walletconnect": "^2.3.9",
"big.js": "^6.1.1",
"bn.js": "^5.1.1",
"bootstrap": "^5.3.1",
Expand Down
22 changes: 10 additions & 12 deletions src/data/web3.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import { singletonHook } from "react-singleton-hook";
import { useEffect, useState } from "react";
import { init, useConnectWallet } from "@web3-onboard/react";
import injectedModule from "@web3-onboard/injected-wallets";
import walletConnectModule from "@web3-onboard/walletconnect";
import ledgerModule from "@web3-onboard/ledger";
import { ethers } from "ethers";
import { init, useConnectWallet } from "@web3-onboard/react";
import walletConnectModule from "@web3-onboard/walletconnect";
import ls from "local-storage";
import { useEffect, useState } from "react";
import { singletonHook } from "react-singleton-hook";
import icon from "../images/build_dao_icon.svg";

const web3onboardKey = "web3-onboard:connectedWallets";

const wcV1InitOptions = {
qrcodeModalOptions: {
mobileLinks: ["metamask", "argent", "trust"],
},
connectFirstChainId: true,
const wcV2InitOptions = {
version: 2,
projectId: "f5f4d212d26f7cf2a7546a5bc3afeb40",
dappUrl: window.location.origin,
};

const walletConnect = walletConnectModule(wcV1InitOptions);
const ledger = ledgerModule();
const walletConnect = walletConnectModule(wcV2InitOptions);
const ledger = ledgerModule(wcV2InitOptions);
const injected = injectedModule();

// initialize Onboard
Expand Down

0 comments on commit 599f88f

Please sign in to comment.