Skip to content

Commit

Permalink
feat(app): enable WalletConnect V2 for ledger module in Web3Connect (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
nutrina authored Sep 5, 2023
1 parent ec73115 commit 31cba92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@self.id/framework": "0.3.3",
"@web3-onboard/core": "^2.20.4",
"@web3-onboard/injected-wallets": "^2.9.0",
"@web3-onboard/ledger": "^2.4.6",
"@web3-onboard/ledger": "2.5.2",
"@web3-onboard/react": "^2.8.9",
"@web3-onboard/walletconnect": "^2.4.0",
"@web3-onboard/walletlink": "^2.0.4",
Expand Down
11 changes: 8 additions & 3 deletions app/utils/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@ import walletConnectModule, { WalletConnectOptions } from "@web3-onboard/walletc
// RPC urls
const MAINNET_RPC_URL = process.env.NEXT_PUBLIC_PASSPORT_MAINNET_RPC_URL as string;

// // Injected wallet - shows all available injected wallets
// Injected wallet - shows all available injected wallets

const injected = injectedModule();

// web3Onboard modules
const walletConnectProjectId = (process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID as string) || "default-project-id";

const walletConnectOptions: WalletConnectOptions = {
projectId: (process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID as string) || "default-project-id",
projectId: walletConnectProjectId,
};

const onBoardExploreUrl =
(process.env.NEXT_PUBLIC_WEB3_ONBOARD_EXPLORE_URL as string) || "https://passport.gitcoin.co/";

const walletConnect = walletConnectModule(walletConnectOptions);
// Include ledger capabilities
const ledger = ledgerModule();
const ledger = ledgerModule({
walletConnectVersion: 2,
enableDebugLogs: false,
projectId: walletConnectProjectId,
});

export const sepoliaChainId = "0xaa36a7";
export const hardhatChainId = "0x7a69";
Expand Down

0 comments on commit 31cba92

Please sign in to comment.