Skip to content

Commit

Permalink
add explicit connectors for metamask and phantom
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Dec 18, 2024
1 parent 0dfe7fb commit 86cbcc1
Show file tree
Hide file tree
Showing 3 changed files with 413 additions and 43 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"@web3-onboard/core": "^2.21.2",
"@web3-onboard/gnosis": "^2.2.0",
"@web3-onboard/injected-wallets": "^2.11.1",
"@web3-onboard/metamask": "^2.2.0",
"@web3-onboard/phantom": "^2.1.1",
"@web3-onboard/react": "^2.8.13",
"@web3-onboard/walletconnect": "^2.4.6",
"axios": "^0.27.2",
Expand Down
22 changes: 21 additions & 1 deletion src/utils/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
providerUrlsTable,
} from "utils";
import logo from "assets/token-logos/acx.svg";
import metamaskSDK from "@web3-onboard/metamask";
import phantomModule from "@web3-onboard/phantom";

const injected = injectedModule();
const gnosis = gnosisModule();
Expand All @@ -22,10 +24,28 @@ const coinbase = coinbaseModule({
supportedWalletType: "all",
});

const metamaskSDKWallet = metamaskSDK({
options: {
extensionOnly: false,
dappMetadata: {
name: "Across Bridge",
},
},
});

const phantom = phantomModule();

export function onboardInit() {
return init({
apiKey: onboardApiKey,
wallets: [injected, coinbase, walletConnect, gnosis],
wallets: [
injected,
coinbase,
walletConnect,
gnosis,
metamaskSDKWallet,
phantom,
],

chains: chainInfoList.map((chainInfo) => ({
id: chainInfo.chainId,
Expand Down
Loading

0 comments on commit 86cbcc1

Please sign in to comment.