feat: Add Phantom web3 onboard wallet support (#4100)

This commit is contained in:
Jerry
2025-08-19 13:31:35 +08:00
committed by GitHub
parent eda742a848
commit fe5aa1f214
3 changed files with 93 additions and 5 deletions

View File

@@ -27,6 +27,7 @@ import frontierModule from "@web3-onboard/frontier";
import tahoModule from "@web3-onboard/taho";
import coinbaseModule from "@web3-onboard/coinbase";
import gnosisModule from "@web3-onboard/gnosis";
import phantomModule from "@web3-onboard/phantom";
// import keystoneModule from "@web3-onboard/keystone";
// import keepkeyModule from "@web3-onboard/keepkey";
// import dcentModule from "@web3-onboard/dcent";
@@ -172,6 +173,10 @@ const web3Wallets = {
label: "Injected",
wallet: injectedModule(),
},
phantom: {
label: "Phantom",
wallet: phantomModule(),
},
// sdk wallets
coinbase: {
label: "Coinbase",
@@ -296,6 +301,12 @@ export function initWeb3Onboard(application, provider) {
label: "Arbitrum",
rpcUrl: "https://rpc.ankr.com/arbitrum",
},
{
id: "0x1",
token: "SOL",
label: "Solana Mainnet",
rpcUrl: "https://api.mainnet-beta.solana.com",
},
];
const appMetadata = {
@@ -304,6 +315,7 @@ export function initWeb3Onboard(application, provider) {
recommendedInjectedWallets: [
{name: "MetaMask", url: "https://metamask.io"},
{name: "Coinbase", url: "https://www.coinbase.com/wallet"},
{name: "Phantom", url: "https://phantom.app"},
],
};