Option to not show installed wallets when using custom wallet list #2127
-
In @rainbow-me/rainbowkit v2, when I am using a custom wallet list as described here - https://www.rainbowkit.com/docs/custom-wallet-list, installed wallets also appear in the modal. Is there a way to only show wallets passed in the custom list in the modal? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 17 replies
-
@agnideepGhosh Yes that's possible. You can set Example with import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
rainbowWallet,
walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';
import { createConfig, http } from 'wagmi';
import { mainnet } from 'wagmi/chains';
const connectors = connectorsForWallets(
[
{
groupName: 'Recommended',
wallets: [rainbowWallet, walletConnectWallet],
},
],
{
appName: 'My RainbowKit App',
projectId: 'YOUR_PROJECT_ID',
}
);
const config = createConfig({
connectors,
multiInjectedProviderDiscovery: false,
chains: [mainnet],
transports: {
[mainnet.id]: http(),
},
}); Example with import '@rainbow-me/rainbowkit/styles.css';
import { getDefaultConfig } from '@rainbow-me/rainbowkit';
import {
rainbowWallet,
walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';
import { mainnet } from 'wagmi/chains';
const config = getDefaultConfig({
wallets: [
{
groupName: 'Recommended',
wallets: [rainbowWallet, walletConnectWallet],
},
],
multiInjectedProviderDiscovery: false,
chains: [mainnet],
appName: 'My RainbowKit App',
projectId: 'YOUR_PROJECT_ID',
}); |
Beta Was this translation helpful? Give feedback.
-
Hi @magiziz, I've been trying to add a custom wallet - Magic. You can find the dedicated wallet connector definition here. However, for some reason, it never shows up in the wallet list. It works fine in version 1.x but doesn't appear in version 2.x. Is there something additional that needs to be done for a custom wallet to show up? Below are the relevant code snippet and screenshots: export const rainbowMagicConnector = ({ chain }: { chain: Chain }): Wallet => ({
id: 'magic',
name: 'Magic',
iconUrl: 'https://svgshare.com/i/pXA.svg',
iconBackground: 'white',
installed: true,
rdns: 'io.magic',
createConnector: () =>
dedicatedWalletConnector({
chains: [chain],
options: {
customLogo: 'https://iq.social/images/iq-logo.svg',
apiKey: env.NEXT_PUBLIC_MAGIC_API_KEY,
accentColor: '#ea3b87',
oauthOptions: {
providers: ['google', 'facebook', 'twitter', 'discord'],
},
isDarkMode: false,
magicSdkConfiguration: {
network: {
chainId: chain.id,
rpcUrl: chain.rpcUrls.default.http[0],
},
},
},
}),
}) Thanks in advance for any guidance! |
Beta Was this translation helpful? Give feedback.
@agnideepGhosh Yes that's possible. You can set
multiInjectedProviderDiscovery
tofalse
in your wagmi config.Example with
createConfig
.