diff --git a/packages/rainbowkit/package.json b/packages/rainbowkit/package.json index 8379415f1e..85896a025c 100644 --- a/packages/rainbowkit/package.json +++ b/packages/rainbowkit/package.json @@ -1,6 +1,6 @@ { "name": "@stakekit/rainbowkit", - "version": "2.2.6", + "version": "2.2.7", "description": "The best way to connect a wallet", "files": ["dist", "styles.css", "wallets"], "type": "module", diff --git a/packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx b/packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx index 6ed5a463e0..e7fb0afbdc 100644 --- a/packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx +++ b/packages/rainbowkit/src/components/ConnectOptions/DesktopOptions.tsx @@ -44,9 +44,12 @@ import { sidebar, sidebarCompactMode, } from './DesktopOptions.css'; +import type { ChainGroup } from '../../wallets/Wallet'; +import { indexBy } from '../../utils/indexBy'; export enum WalletStep { None = 'NONE', + SelectChainGroup = 'SELECT_CHAIN_GROUP', LearnCompact = 'LEARN_COMPACT', Get = 'GET', Connect = 'CONNECT', @@ -88,7 +91,28 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { .sort((a, b) => a.groupIndex - b.groupIndex); const unfilteredWallets = useWalletConnectors(); - const groupedWallets = groupBy(wallets, (wallet) => wallet.groupName); + const chainGroups = indexBy( + wallets.map((w) => w.chainGroup), + (cg) => cg.id, + ); + + const [selectedChainGroupId, setSelectedChainGroupId] = useState< + ChainGroup['id'] | undefined + >(Object.values(chainGroups).length > 1 ? undefined : 'ethereum'); + + const groupedByChainGroupWallets = groupBy( + wallets, + (wallet) => wallet.chainGroup.id, + ); + + const walletsFromSelectedChainGroup = selectedChainGroupId + ? groupedByChainGroupWallets[selectedChainGroupId] || [] + : []; + + const groupedByGroupNameWallets = groupBy( + walletsFromSelectedChainGroup, + (wallet) => wallet.groupName, + ); const supportedI18nGroupNames = [ 'Recommended', @@ -208,10 +232,13 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { } setWalletStep(newWalletStep); }; + const [initialWalletStep, setInitialWalletStep] = useState( - WalletStep.None, + Object.values(chainGroups).length > 1 + ? WalletStep.SelectChainGroup + : WalletStep.None, ); - const [walletStep, setWalletStep] = useState(WalletStep.None); + const [walletStep, setWalletStep] = useState(initialWalletStep); let walletContent = null; let headerLabel = null; @@ -228,11 +255,24 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { hasExtension && selectedWallet?.mobileDownloadUrl ); + const onChainGroupSelect = (chainGroupId: string) => { + setSelectedChainGroupId(chainGroupId); + changeWalletStep(WalletStep.None); + }; + switch (walletStep) { + case WalletStep.SelectChainGroup: + headerLabel = i18n.t('connect.select_chain_group.title'); + break; case WalletStep.None: + headerLabel = i18n.t('connect.title'); walletContent = ( changeWalletStep(WalletStep.Get)} /> ); + headerBackButtonLink = + compactModeEnabled && Object.values(chainGroups).length > 1 + ? WalletStep.SelectChainGroup + : null; break; case WalletStep.LearnCompact: walletContent = ( @@ -364,13 +404,66 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { default: break; } + + const topContent = (() => { + if (!compactModeEnabled) return null; + + if (walletStep === WalletStep.None) { + return ( + + {headerBackButtonLink && ( + { + headerBackButtonLink && + changeWalletStep(headerBackButtonLink, true); + headerBackButtonCallback?.(); + }} + paddingX="8" + paddingY="4" + style={{ + boxSizing: 'content-box', + height: 17, + willChange: 'transform', + }} + transition="default" + type="button" + > + + + )} + + ); + } + + if (Disclaimer) { + return ( + + changeWalletStep(WalletStep.LearnCompact)} + /> + + ); + } + + return ; + })(); + return ( - {(compactModeEnabled ? walletStep === WalletStep.None : true) && ( + {(compactModeEnabled + ? walletStep === WalletStep.None || + walletStep === WalletStep.SelectChainGroup + : true) && ( void }) { marginTop="16" > - {compactModeEnabled && Disclaimer && ( - - changeWalletStep(WalletStep.LearnCompact)} - /> - - )} - {compactModeEnabled && !Disclaimer && ( - - )} + {topContent} void }) { weight="heavy" testId={'connect-header-label'} > - {i18n.t('connect.title')} + {headerLabel} {compactModeEnabled && ( @@ -412,49 +496,65 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { )} - {Object.entries(groupedWallets).map( - ([groupName, wallets], index) => - wallets.length > 0 && ( - - {groupName ? ( - - - {supportedI18nGroupNames.includes(groupName) - ? i18n.t( - `connector_group.${groupName.toLowerCase()}`, - ) - : groupName} - + {walletStep === WalletStep.SelectChainGroup ? ( + + {Object.values(chainGroups).map((cg) => ( + onChainGroupSelect(cg.id)} + /> + ))} + + ) : ( + Object.entries(groupedByGroupNameWallets).map( + ([groupName, wallets], index) => + wallets.length > 0 && ( + + {groupName ? ( + + + {supportedI18nGroupNames.includes(groupName) + ? i18n.t( + `connector_group.${groupName.toLowerCase()}`, + ) + : groupName} + + + ) : null} + + {wallets.map((wallet) => { + return ( + selectWallet(wallet)} + ready={wallet.ready} + recent={wallet.recent} + testId={`wallet-option-${wallet.id}`} + isRainbowKitConnector={ + wallet.isRainbowKitConnector + } + /> + ); + })} - ) : null} - - {wallets.map((wallet) => { - return ( - selectWallet(wallet)} - ready={wallet.ready} - recent={wallet.recent} - testId={`wallet-option-${wallet.id}`} - isRainbowKitConnector={wallet.isRainbowKitConnector} - /> - ); - })} - - - ), + + ), + ) )} {compactModeEnabled && ( @@ -506,7 +606,10 @@ export function DesktopOptions({ onClose }: { onClose: () => void }) { )} )} - {(compactModeEnabled ? walletStep !== WalletStep.None : true) && ( + {(compactModeEnabled + ? walletStep !== WalletStep.SelectChainGroup && + walletStep !== WalletStep.None + : true) && ( <> {!compactModeEnabled && ( diff --git a/packages/rainbowkit/src/components/ConnectOptions/MobileOptions.tsx b/packages/rainbowkit/src/components/ConnectOptions/MobileOptions.tsx index 712c78319e..9524ee980f 100644 --- a/packages/rainbowkit/src/components/ConnectOptions/MobileOptions.tsx +++ b/packages/rainbowkit/src/components/ConnectOptions/MobileOptions.tsx @@ -24,6 +24,10 @@ import { useCoolMode } from '../RainbowKitProvider/useCoolMode'; import { setWalletConnectDeepLink } from '../RainbowKitProvider/walletConnectDeepLink'; import { Text } from '../Text/Text'; import * as styles from './MobileOptions.css'; +import type { ChainGroup } from '../../wallets/Wallet'; +import { indexBy } from '../../utils/indexBy'; +import { groupBy } from '../../utils/groupBy'; +import { ModalSelection } from '../ModalSelection/ModalSelection'; const LoadingSpinner = ({ wallet }: { wallet: WalletConnector }) => { const width = 80; @@ -203,6 +207,7 @@ export function WalletButton({ } enum MobileWalletStep { + SelectChainGroup = 'SELECT_CHAIN_GROUP', Connect = 'CONNECT', Get = 'GET', } @@ -214,23 +219,72 @@ export function MobileOptions({ onClose }: { onClose: () => void }) { ); const { disclaimer: Disclaimer, learnMoreUrl } = useContext(AppContext); + const chainGroups = indexBy( + wallets.map((w) => w.chainGroup), + (cg) => cg.id, + ); + + const [selectedChainGroupId, setSelectedChainGroupId] = useState< + ChainGroup['id'] | undefined + >(Object.values(chainGroups).length > 1 ? undefined : 'ethereum'); + + const groupedByChainGroupWallets = groupBy( + wallets, + (wallet) => wallet.chainGroup.id, + ); + + const walletsFromSelectedChainGroup = selectedChainGroupId + ? groupedByChainGroupWallets[selectedChainGroupId] || [] + : []; + let headerLabel = null; let walletContent = null; let headerBackgroundContrast = false; let headerBackButtonLink: MobileWalletStep | null = null; const [walletStep, setWalletStep] = useState( - MobileWalletStep.Connect, + Object.values(chainGroups).length > 1 + ? MobileWalletStep.SelectChainGroup + : MobileWalletStep.Connect, ); const { i18n } = useContext(I18nContext); const ios = isIOS(); + const onChainGroupSelect = (chainGroupId: string) => { + setSelectedChainGroupId(chainGroupId); + setWalletStep(MobileWalletStep.Connect); + }; + switch (walletStep) { + case MobileWalletStep.SelectChainGroup: { + headerLabel = i18n.t('connect.select_chain_group.title'); + headerBackgroundContrast = true; + walletContent = ( + + + {Object.values(chainGroups).map((cg) => ( + onChainGroupSelect(cg.id)} + /> + ))} + + + ); + break; + } case MobileWalletStep.Connect: { headerLabel = i18n.t('connect.title'); headerBackgroundContrast = true; + headerBackButtonLink = + Object.values(chainGroups).length > 1 + ? MobileWalletStep.SelectChainGroup + : null; walletContent = ( void }) { paddingTop="6" > - {wallets + {walletsFromSelectedChainGroup .filter((wallet) => wallet.ready) .map((wallet) => { return ( @@ -314,7 +368,7 @@ export function MobileOptions({ onClose }: { onClose: () => void }) { headerLabel = i18n.t('get.title'); headerBackButtonLink = MobileWalletStep.Connect; - const mobileWallets = wallets + const mobileWallets = walletsFromSelectedChainGroup ?.filter( (wallet) => wallet.downloadUrls?.ios || diff --git a/packages/rainbowkit/src/index.ts b/packages/rainbowkit/src/index.ts index b15c2c94e5..7f8c500acb 100644 --- a/packages/rainbowkit/src/index.ts +++ b/packages/rainbowkit/src/index.ts @@ -21,6 +21,7 @@ export type { WalletList, WalletDetailsParams, RainbowKitWalletConnectParameters, + ChainGroup, } from './wallets/Wallet'; export type { Theme } from './components/RainbowKitProvider/RainbowKitProvider'; export type { diff --git a/packages/rainbowkit/src/locales/en_US.json b/packages/rainbowkit/src/locales/en_US.json index 7c5e31bd15..a1f8cf0ba4 100644 --- a/packages/rainbowkit/src/locales/en_US.json +++ b/packages/rainbowkit/src/locales/en_US.json @@ -46,6 +46,9 @@ "connect": { "label": "Connect", "title": "Connect a Wallet", + "select_chain_group": { + "title": "Select a Chain" + }, "new_to_ethereum": { "description": "New to Ethereum wallets?", "learn_more": { @@ -194,6 +197,8 @@ "chains": { "title": "Switch Networks", + "select_title": "Select Network", + "select_group": "Select Chain Group", "wrong_network": "Wrong network detected, switch or disconnect to continue.", "confirm": "Confirm in Wallet", "confirm_error": "Error switching chain", diff --git a/packages/rainbowkit/src/utils/chain-groups.ts b/packages/rainbowkit/src/utils/chain-groups.ts new file mode 100644 index 0000000000..303ae1962e --- /dev/null +++ b/packages/rainbowkit/src/utils/chain-groups.ts @@ -0,0 +1,7 @@ +import type { ChainGroup } from '../wallets/Wallet'; + +export const ethereumChainGroup: ChainGroup = { + id: 'ethereum', + title: 'Ethereum', + iconUrl: 'https://assets.stakek.it/networks/ethereum.svg', +}; diff --git a/packages/rainbowkit/src/wallets/Wallet.ts b/packages/rainbowkit/src/wallets/Wallet.ts index 02e4071cf1..217f5fc7cf 100644 --- a/packages/rainbowkit/src/wallets/Wallet.ts +++ b/packages/rainbowkit/src/wallets/Wallet.ts @@ -75,6 +75,7 @@ export type Wallet = { }; hidden?: () => boolean; createConnector: (walletDetails: WalletDetailsParams) => CreateConnectorFn; + chainGroup: ChainGroup; } & RainbowKitConnector; export interface DefaultWalletOptions { @@ -113,8 +114,15 @@ export type RainbowKitDetails = Omit & { // Used specifically in `connectorsForWallets` logic // to make sure we can also get WalletConnect modal in rainbowkit showQrModal?: true; + chainGroup: ChainGroup; }; +export interface ChainGroup { + id: 'ethereum' | (string & {}); + title: string; + iconUrl: string; +} + export type WalletDetailsParams = { rkDetails: RainbowKitDetails }; export type CreateConnector = (walletDetails: { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/ZilPayWallet/zilPayWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/ZilPayWallet/zilPayWallet.ts index d9ac89fca5..e6cae133d3 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/ZilPayWallet/zilPayWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/ZilPayWallet/zilPayWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -20,6 +21,7 @@ export const zilPayWallet = ({ rdns: 'io.zilpay', iconUrl: async () => (await import('./zilPayWallet.svg')).default, iconBackground: '#ffffff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.zilpaymobile', ios: 'https://apps.apple.com/ru/app/zilpay/id1547105860', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/argentWallet/argentWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/argentWallet/argentWallet.ts index c3deb9042f..10fd677c0f 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/argentWallet/argentWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/argentWallet/argentWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -26,6 +27,7 @@ export const argentWallet = ({ : `argent://app/wc?uri=${encodeURIComponent(uri)}`; }, }, + chainGroup: ethereumChainGroup, qrCode: { getUri: (uri: string) => uri, instructions: { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/backpackWallet/backpackWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/backpackWallet/backpackWallet.ts index f84102c678..af47be0d83 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/backpackWallet/backpackWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/backpackWallet/backpackWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -12,6 +13,7 @@ export const backpackWallet = (): Wallet => { iconUrl: async () => (await import('./backpackWallet.svg')).default, iconBackground: '#0C0D10', installed: hasInjectedProvider({ namespace: 'backpack.ethereum' }), + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=app.backpack.mobile', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/berasigWallet/berasigWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/berasigWallet/berasigWallet.ts index 1c5947b679..52cd001422 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/berasigWallet/berasigWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/berasigWallet/berasigWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -23,6 +24,7 @@ export const berasigWallet = ({ iconUrl: async () => (await import('./berasigWallet.svg')).default, iconBackground: '#ffffff', installed: isBerasigWalletInjected, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.berasig.ios', ios: 'https://apps.apple.com/us/app/berasig-wallet-on-berachain/id6502052535', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.ts index a1dadca29a..19fc5ea3bc 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bestWallet/bestWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; import type { DefaultWalletOptions } from './../../Wallet'; @@ -12,6 +13,7 @@ export const bestWallet = ({ name: 'Best Wallet', iconUrl: async () => (await import('./bestWallet.svg')).default, iconBackground: '#5961FF', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://best.sng.link/Dnio2/rto7?_smtype=3', ios: 'https://best.sng.link/Dnio2/rto7?_smtype=3', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts index a37008b3ad..d1abce0a04 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bifrostWallet/bifrostWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { Wallet } from '../../Wallet'; import { @@ -30,6 +31,7 @@ export const bifrostWallet = ({ iconUrl: async () => (await import('./bifrostWallet.svg')).default, iconBackground: '#fff', installed: !shouldUseWalletConnect ? isBifrostInjected : undefined, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.bifrostwallet.app', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/binanceWallet/binanceWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/binanceWallet/binanceWallet.ts index 632517ef1f..69ae7690fd 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/binanceWallet/binanceWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/binanceWallet/binanceWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { @@ -24,6 +25,7 @@ export const binanceWallet = ({ iconUrl: async () => (await import('./binanceWallet.svg')).default, iconBackground: '#000000', installed: !shouldUseWalletConnect ? isBinanceInjected : undefined, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.binance.dev', ios: 'https://apps.apple.com/us/app/id1436799971', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts index 134810ad62..21b61aa9a2 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bitgetWallet/bitgetWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { @@ -26,6 +27,7 @@ export const bitgetWallet = ({ iconAccent: '#f6851a', iconBackground: '#fff', installed: !shouldUseWalletConnect ? isBitKeepInjected : undefined, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://web3.bitget.com/en/wallet-download?type=0', ios: 'https://apps.apple.com/app/bitkeep/id1395301115', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bitskiWallet/bitskiWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bitskiWallet/bitskiWallet.ts index 58fb59b595..5c30add22e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bitskiWallet/bitskiWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bitskiWallet/bitskiWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -10,6 +11,7 @@ export const bitskiWallet = (): Wallet => ({ installed: hasInjectedProvider({ flag: 'isBitski' }), iconUrl: async () => (await import('./bitskiWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chrome.google.com/webstore/detail/bitski/feejiigddaafeojfddjjlmfkabimkell', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.ts index 3b2ffb8f49..ea036c6c57 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bitverseWallet/bitverseWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -11,6 +12,7 @@ export const bitverseWallet = ({ name: 'Bitverse Wallet', iconUrl: async () => (await import('./bitverseWallet.svg')).default, iconBackground: '#171728', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.bitverse.app&pli=1', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bloomWallet/bloomWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bloomWallet/bloomWallet.ts index 137beb1268..85dbbdcd9f 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bloomWallet/bloomWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bloomWallet/bloomWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -10,6 +11,7 @@ export const bloomWallet = ({ iconBackground: '#000', iconAccent: '#000', iconUrl: async () => (await import('./bloomWallet.svg')).default, + chainGroup: ethereumChainGroup, downloadUrls: { desktop: 'https://bloomwallet.io/', }, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/braveWallet/braveWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/braveWallet/braveWallet.ts index 08f85ce70e..d1eb6fee59 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/braveWallet/braveWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/braveWallet/braveWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -11,6 +12,7 @@ export const braveWallet = (): Wallet => ({ iconUrl: async () => (await import('./braveWallet.svg')).default, iconBackground: '#fff', installed: hasInjectedProvider({ flag: 'isBraveWallet' }), + chainGroup: ethereumChainGroup, downloadUrls: { // We're opting not to provide a download prompt if Brave isn't the current // browser since it's unlikely to be a desired behavior for users. It's diff --git a/packages/rainbowkit/src/wallets/walletConnectors/bybitWallet/bybitWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/bybitWallet/bybitWallet.ts index e542f13a2f..4b67da1e79 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/bybitWallet/bybitWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/bybitWallet/bybitWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -30,6 +31,7 @@ export const bybitWallet = ({ iconUrl: async () => (await import('./bybitWallet.svg')).default, installed: !shouldUseWalletConnect ? isBybitInjected : undefined, iconBackground: '#000000', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/bybit-wallet/pdliaogehgdbhbnmkklieghmmjkpigpa', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/clvWallet/clvWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/clvWallet/clvWallet.ts index 997db8293d..a343257d27 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/clvWallet/clvWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/clvWallet/clvWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -21,6 +22,7 @@ export const clvWallet = ({ iconBackground: '#fff', iconAccent: '#BDFDE2', installed: isCLVInjected, + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chrome.google.com/webstore/detail/clv-wallet/nhnkbkgjikgcigadomkphalanndcapjk', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts index ec800d3431..2474be05a1 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -25,6 +26,7 @@ export const coin98Wallet = ({ iconAccent: '#CDA349', iconBackground: '#fff', rdns: 'coin98.com', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=coin98.crypto.finance.media', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.ts index 9c488ddc60..206e52f77e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { type CreateConnectorFn, createConnector } from 'wagmi'; import { type CoinbaseWalletParameters, @@ -37,6 +38,7 @@ export const coinbaseWallet: CoinbaseWallet = ({ appName, appIcon }) => { // prompting the user to connect or create a wallet via passkey. This means if you either have // or don't have the coinbase wallet browser extension installed it'll do some action anyways installed: true, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=org.toshi', ios: 'https://apps.apple.com/us/app/coinbase-wallet-store-crypto/id1278383455', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.ts index 86a281325e..5f167100f8 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/compassWallet/compassWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -14,6 +15,7 @@ export const compassWallet = (): Wallet => { rdns: 'io.leapwallet.CompassWallet', iconUrl: async () => (await import('./compassWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/compass-wallet-for-sei/anokgmphncpekkhclmingpimjmcooifb', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/coreWallet/coreWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/coreWallet/coreWallet.ts index 82e8925fec..c11b6fb44b 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/coreWallet/coreWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/coreWallet/coreWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -23,6 +24,7 @@ export const coreWallet = ({ iconUrl: async () => (await import('./coreWallet.svg')).default, iconBackground: '#1A1A1C', installed: !shouldUseWalletConnect ? isCoreInjected : undefined, + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.avaxwallet', ios: 'https://apps.apple.com/us/app/core-wallet/id6443685999', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/dawnWallet/dawnWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/dawnWallet/dawnWallet.ts index 49f4f73f03..93b2c2c52e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/dawnWallet/dawnWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/dawnWallet/dawnWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isIOS } from '../../../utils/isMobile'; import type { Wallet } from '../../Wallet'; import { @@ -12,6 +13,7 @@ export const dawnWallet = (): Wallet => ({ iconBackground: '#000000', installed: hasInjectedProvider({ flag: 'isDawn' }), hidden: () => !isIOS(), + chainGroup: ethereumChainGroup, downloadUrls: { ios: 'https://apps.apple.com/us/app/dawn-ethereum-wallet/id1673143782', mobile: 'https://dawnwallet.xyz', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/desigWallet/desigWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/desigWallet/desigWallet.ts index b7acffc91e..19d3e30f48 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/desigWallet/desigWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/desigWallet/desigWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -11,6 +12,7 @@ export const desigWallet = (): Wallet => { iconUrl: async () => (await import('./desigWallet.svg')).default, iconBackground: '#ffffff', installed: hasInjectedProvider({ namespace: 'desig.ethereum' }), + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.desig.app', ios: 'https://apps.apple.com/app/desig-wallet/id6450106028', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/enkryptWallet/enkryptWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/enkryptWallet/enkryptWallet.ts index 534aae01b3..42017dfc83 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/enkryptWallet/enkryptWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/enkryptWallet/enkryptWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -12,6 +13,7 @@ export const enkryptWallet = (): Wallet => { installed: hasInjectedProvider({ namespace: 'enkrypt.providers.ethereum' }), iconUrl: async () => (await import('./enkryptWallet.svg')).default, iconBackground: '#FFFFFF', + chainGroup: ethereumChainGroup, downloadUrls: { qrCode: 'https://www.enkrypt.com', chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/foxWallet/foxWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/foxWallet/foxWallet.ts index 5a8c91bdce..a9ae9178b1 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/foxWallet/foxWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/foxWallet/foxWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -21,6 +22,7 @@ export const foxWallet = ({ name: 'FoxWallet', iconUrl: async () => (await import('./foxWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.foxwallet.play', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/frameWallet/frameWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/frameWallet/frameWallet.ts index 01f17d3c01..8e6fb5692d 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/frameWallet/frameWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/frameWallet/frameWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -11,6 +12,7 @@ export const frameWallet = (): Wallet => ({ installed: hasInjectedProvider({ flag: 'isFrame' }), iconUrl: async () => (await import('./frameWallet.svg')).default, iconBackground: '#121C20', + chainGroup: ethereumChainGroup, downloadUrls: { browserExtension: 'https://frame.sh/', }, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts index 46f584a9ef..cf3f0299ad 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/frontierWallet/frontierWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { Wallet } from '../../Wallet'; import { @@ -25,6 +26,7 @@ export const frontierWallet = ({ installed: isFrontierInjected, iconUrl: async () => (await import('./frontierWallet.svg')).default, iconBackground: '#CC703C', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.frontierwallet', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/gateWallet/gateWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/gateWallet/gateWallet.ts index 7e0ad2f670..7bfe0f2cbc 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/gateWallet/gateWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/gateWallet/gateWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { @@ -22,6 +23,7 @@ export const gateWallet = ({ iconUrl: async () => (await import('./gateWallet.svg')).default, iconAccent: '#fff', iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.gateio.gateio', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/imTokenWallet/imTokenWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/imTokenWallet/imTokenWallet.ts index 2e5e009039..c6c3e0fccf 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/imTokenWallet/imTokenWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/imTokenWallet/imTokenWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -11,6 +12,7 @@ export const imTokenWallet = ({ name: 'imToken', iconUrl: async () => (await import('./imTokenWallet.svg')).default, iconBackground: '#098de6', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=im.token.app', ios: 'https://itunes.apple.com/us/app/imtoken2/id1384798940', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/injectedWallet/injectedWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/injectedWallet/injectedWallet.ts index 81ed27089f..9e2d25428c 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/injectedWallet/injectedWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/injectedWallet/injectedWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector } from '../../getInjectedConnector'; @@ -6,5 +7,6 @@ export const injectedWallet = (): Wallet => ({ name: 'Browser Wallet', iconUrl: async () => (await import('./injectedWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, createConnector: getInjectedConnector({}), }); diff --git a/packages/rainbowkit/src/wallets/walletConnectors/iopayWallet/iopayWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/iopayWallet/iopayWallet.ts index 6dcd5d0b2d..c19dcc893e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/iopayWallet/iopayWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/iopayWallet/iopayWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { isAndroid } from '../../../utils/isMobile'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector } from '../../getInjectedConnector'; @@ -22,6 +23,7 @@ export const iopayWallet = ({ name: 'ioPay Wallet', iconUrl: async () => (await import('./iopayWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.iotex.iopay.gp&pli=1', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/kaiaWallet/kaiaWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/kaiaWallet/kaiaWallet.ts index a1bbc98442..e2abaca89d 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/kaiaWallet/kaiaWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/kaiaWallet/kaiaWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -27,6 +28,7 @@ export const kaiaWallet = ({ iconUrl: async () => (await import('./kaiaWallet.svg')).default, installed: isKaiaWalletInjected || undefined, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/kaia-wallet/jblndlipeogpafnldhgmapagcccfchpi', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/kaikasWallet/kaikasWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/kaikasWallet/kaikasWallet.ts index 8edd9d9534..b297b6de7b 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/kaikasWallet/kaikasWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/kaikasWallet/kaikasWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -27,6 +28,7 @@ export const kaikasWallet = ({ iconUrl: async () => (await import('./kaikasWallet.svg')).default, installed: isKaikasWalletInjected || undefined, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/kaikas/jblndlipeogpafnldhgmapagcccfchpi', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/krakenWallet/krakenWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/krakenWallet/krakenWallet.ts index 21f062b97e..2f0a9d462e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/krakenWallet/krakenWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/krakenWallet/krakenWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; import type { DefaultWalletOptions } from './../../Wallet'; @@ -12,6 +13,7 @@ export const krakenWallet = ({ name: 'Kraken Wallet', iconUrl: async () => (await import('./krakenWallet.svg')).default, iconBackground: '#FFD8EA', + chainGroup: ethereumChainGroup, downloadUrls: { ios: 'https://apps.apple.com/us/app/kraken-wallet/id1626327149', mobile: 'https://kraken.com/wallet', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts index 4d53b45e74..b5058fea13 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/kresusWallet/kresusWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; export type KresusWalletOptions = DefaultWalletOptions; @@ -11,6 +12,7 @@ export const kresusWallet = ({ name: 'Kresus Wallet', iconUrl: async () => (await import('./kresusWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.kresus.superapp', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts index f566918e6e..e2b7be8511 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/ledgerWallet/ledgerWallet.ts @@ -1,4 +1,5 @@ import { isAndroid } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -10,6 +11,7 @@ export const ledgerWallet = ({ }: LedgerWalletOptions): Wallet => ({ id: 'ledger', iconBackground: '#000', + chainGroup: ethereumChainGroup, iconAccent: '#000', name: 'Ledger', iconUrl: async () => (await import('./ledgerWallet.svg')).default, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/magicEdenWallet/magicEdenWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/magicEdenWallet/magicEdenWallet.ts index 8d5faf4eee..318024fc16 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/magicEdenWallet/magicEdenWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/magicEdenWallet/magicEdenWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -11,6 +12,7 @@ export const magicEdenWallet = (): Wallet => { rdns: 'io.magiceden.wallet', iconUrl: async () => (await import('./magicEden.svg')).default, iconBackground: '#36114D', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ namespace: 'magicEden.ethereum' }), downloadUrls: { chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts index 81dfc41c53..36b3f611c6 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.ts @@ -1,4 +1,5 @@ import { createConnector } from 'wagmi'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { metaMask } from 'wagmi/connectors'; import type { DefaultWalletOptions, @@ -82,6 +83,7 @@ export const metaMaskWallet = ({ iconUrl: async () => (await import('./metaMaskWallet.svg')).default, iconAccent: '#f6851a', iconBackground: '#fff', + chainGroup: ethereumChainGroup, installed: isMetaMaskInjected ? isMetaMaskInjected : undefined, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.metamask', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/mewWallet/mewWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/mewWallet/mewWallet.ts index 3298888db3..4db8a9fe14 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/mewWallet/mewWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/mewWallet/mewWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -24,6 +25,7 @@ export const mewWallet = ({ name: 'MEW wallet', iconUrl: async () => (await import('./mewWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, installed: !shouldUseWalletConnect ? isMEWInjected : undefined, downloadUrls: { android: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts index e0254963de..e6bd8fa46f 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/nestWallet/nestWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -10,6 +11,7 @@ export const nestWallet = (): Wallet => ({ rdns: 'xyz.nestwallet', iconUrl: async () => (await import('./nestWallet.svg')).default, iconBackground: '#fff0', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ flag: 'isNestWallet' }), downloadUrls: { browserExtension: 'https://nestwallet.xyz', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/oktoWallet/oktoWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/oktoWallet/oktoWallet.ts index 241cf37b6f..0fd5207304 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/oktoWallet/oktoWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/oktoWallet/oktoWallet.ts @@ -1,4 +1,5 @@ import { isAndroid } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -12,6 +13,7 @@ export const oktoWallet = ({ name: 'Okto', iconUrl: async () => (await import('./oktoWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=im.okto.contractwalletclient', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/okxWallet/okxWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/okxWallet/okxWallet.ts index cc30331cef..2b18651442 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/okxWallet/okxWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/okxWallet/okxWallet.ts @@ -1,4 +1,5 @@ import { isAndroid } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -22,6 +23,7 @@ export const okxWallet = ({ iconUrl: async () => (await import('./okxWallet.svg')).default, iconAccent: '#000', iconBackground: '#000', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.okinc.okex.gp', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/omniWallet/omniWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/omniWallet/omniWallet.ts index 753422a2e8..bec270e63e 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/omniWallet/omniWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/omniWallet/omniWallet.ts @@ -1,4 +1,5 @@ import { isAndroid } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -12,6 +13,7 @@ export const omniWallet = ({ name: 'Omni', iconUrl: async () => (await import('./omniWallet.svg')).default, iconBackground: '#000', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=fi.steakwallet.app', ios: 'https://itunes.apple.com/us/app/id1569375204', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.ts index 44ecff18e7..8433acca86 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/oneInchWallet/oneInchWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; export type OneInchWalletOptions = DefaultWalletOptions; @@ -11,6 +12,7 @@ export const oneInchWallet = ({ name: '1inch Wallet', iconUrl: async () => (await import('./oneInchWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.oneinch.android', ios: 'https://apps.apple.com/us/app/1inch-crypto-defi-wallet/id1546049391', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.ts index 39b52e2942..857c069935 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -11,6 +12,7 @@ export const oneKeyWallet = (): Wallet => { rdns: 'so.onekey.app.wallet', iconAccent: '#00B812', iconBackground: '#fff', + chainGroup: ethereumChainGroup, iconUrl: async () => (await import('./oneKeyWallet.svg')).default, installed: hasInjectedProvider({ namespace: '$onekey.ethereum' }), downloadUrls: { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/paraSwapWallet/paraswapWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/paraSwapWallet/paraswapWallet.ts index 1bef05ad39..54bcb7a718 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/paraSwapWallet/paraswapWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/paraSwapWallet/paraswapWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -12,6 +13,7 @@ export const paraSwapWallet = ({ name: 'ParaSwap Wallet', iconUrl: async () => (await import('./paraSwapWallet.svg')).default, iconBackground: '#578CFC', + chainGroup: ethereumChainGroup, downloadUrls: { ios: 'https://apps.apple.com/us/app/paraswap-multichain-wallet/id1584610690', mobile: 'https://paraswap.io', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/phantomWallet/phantomWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/phantomWallet/phantomWallet.ts index ec1e841e74..afc1c00327 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/phantomWallet/phantomWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/phantomWallet/phantomWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -11,6 +12,7 @@ export const phantomWallet = (): Wallet => { rdns: 'app.phantom', iconUrl: async () => (await import('./phantomWallet.svg')).default, iconBackground: '#9A8AEE', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ namespace: 'phantom.ethereum' }), downloadUrls: { android: 'https://play.google.com/store/apps/details?id=app.phantom', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts index cb30306fc3..a624f9c8ba 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/rabbyWallet/rabbyWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -10,6 +11,7 @@ export const rabbyWallet = (): Wallet => ({ iconUrl: async () => (await import('./rabbyWallet.svg')).default, rdns: 'io.rabby', iconBackground: '#8697FF', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ flag: 'isRabby' }), downloadUrls: { chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts index 662fd2f696..838c344250 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/rainbowWallet/rainbowWallet.ts @@ -1,4 +1,5 @@ import { isAndroid, isIOS } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -31,6 +32,7 @@ export const rainbowWallet = ({ rdns: 'me.rainbow', iconUrl: async () => (await import('./rainbowWallet.svg')).default, iconBackground: '#0c2f78', + chainGroup: ethereumChainGroup, installed: !shouldUseWalletConnect ? isRainbowInjected : undefined, downloadUrls: { android: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/ramperWallet/ramperWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/ramperWallet/ramperWallet.ts index 88f458e615..bd98f24230 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/ramperWallet/ramperWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/ramperWallet/ramperWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -16,6 +17,7 @@ export const ramperWallet = (): Wallet => { installed: isRamperWalletInjected, iconAccent: '#CDA349', iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/ramper-wallet/nbdhibgjnjpnkajaghbffjbkcgljfgdi', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/roninWallet/roninWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/roninWallet/roninWallet.ts index 5f3983b4a6..a4fda7d183 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/roninWallet/roninWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/roninWallet/roninWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -26,6 +27,7 @@ export const roninWallet = ({ name: 'Ronin Wallet', iconUrl: async () => (await import('./roninWallet.svg')).default, iconBackground: '#ffffff', + chainGroup: ethereumChainGroup, rdns: 'com.roninchain.wallet', installed: isRoninInjected || undefined, downloadUrls: { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/safeWallet/safeWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/safeWallet/safeWallet.ts index aca14fd19a..42cacbd380 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/safeWallet/safeWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/safeWallet/safeWallet.ts @@ -1,4 +1,5 @@ import { createConnector } from 'wagmi'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { safe } from 'wagmi/connectors'; import type { Wallet, WalletDetailsParams } from '../../Wallet'; @@ -7,6 +8,7 @@ export const safeWallet = (): Wallet => ({ name: 'Safe', iconAccent: '#12ff80', iconBackground: '#fff', + chainGroup: ethereumChainGroup, iconUrl: async () => (await import('./safeWallet.svg')).default, installed: // Only allowed in iframe context diff --git a/packages/rainbowkit/src/wallets/walletConnectors/safeheronWallet/safeheronWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/safeheronWallet/safeheronWallet.ts index 721498af0c..7545dfa3c5 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/safeheronWallet/safeheronWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/safeheronWallet/safeheronWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -13,6 +14,7 @@ export const safeheronWallet = (): Wallet => ({ }), iconUrl: async () => (await import('./safeheronWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chrome.google.com/webstore/detail/safeheron/aiaghdjafpiofpainifbgfgjfpclngoh', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/safepalWallet/safepalWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/safepalWallet/safepalWallet.ts index 4e64ed9147..b75caa7b3f 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/safepalWallet/safepalWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/safepalWallet/safepalWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, InstructionStepName, @@ -94,6 +95,7 @@ export const safepalWallet = ({ installed: isSafePalWalletInjected, iconAccent: '#3375BB', iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=io.safepal.wallet&referrer=utm_source%3Drainbowkit%26utm_medium%3Ddisplay%26utm_campaign%3Ddownload', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/seifWallet/seifWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/seifWallet/seifWallet.ts index d5935cf4bb..09a61cb852 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/seifWallet/seifWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/seifWallet/seifWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -14,6 +15,7 @@ export function seifWallet(): Wallet { installed: !!injectedProvider, iconUrl: async () => (await import('./seifWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chromewebstore.google.com/detail/seif/albakdmmdafeafbehmcpoejenbeojejl', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/subWallet/subWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/subWallet/subWallet.ts index 1499043427..1ed8e2d221 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/subWallet/subWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/subWallet/subWallet.ts @@ -1,3 +1,4 @@ +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, InstructionStepName, @@ -93,6 +94,7 @@ export const subWallet = ({ rdns: 'app.subwallet', iconUrl: async () => (await import('./subWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, installed: isSubWalletInjected || undefined, downloadUrls: { browserExtension: 'https://www.subwallet.app/download', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/tahoWallet/tahoWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/tahoWallet/tahoWallet.ts index 1aac034484..e5b3a2afc2 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/tahoWallet/tahoWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/tahoWallet/tahoWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -9,6 +10,7 @@ export const tahoWallet = (): Wallet => { id: 'taho', name: 'Taho', iconBackground: '#d08d57', + chainGroup: ethereumChainGroup, iconUrl: async () => (await import('./tahoWallet.svg')).default, downloadUrls: { chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/talismanWallet/talismanWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/talismanWallet/talismanWallet.ts index f6074e52c7..3816169201 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/talismanWallet/talismanWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/talismanWallet/talismanWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -10,6 +11,7 @@ export const talismanWallet = (): Wallet => ({ rdns: 'xyz.talisman', iconUrl: async () => (await import('./talismanWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ namespace: 'talismanEth', flag: 'isTalisman', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts index 188e3af33e..93a49fb890 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts @@ -1,4 +1,5 @@ import { isMobile } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -25,6 +26,7 @@ export const tokenPocketWallet = ({ rdns: 'pro.tokenpocket', iconUrl: async () => (await import('./tokenPocketWallet.svg')).default, iconBackground: '#2980FE', + chainGroup: ethereumChainGroup, installed: !shouldUseWalletConnect ? isTokenPocketInjected : undefined, downloadUrls: { chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts index 530c955efc..7d986a85d5 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.ts @@ -1,4 +1,5 @@ import { isSafari } from '../../../utils/browsers'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -10,6 +11,7 @@ export const tokenaryWallet = (): Wallet => ({ name: 'Tokenary', iconUrl: async () => (await import('./tokenaryWallet.svg')).default, iconBackground: '#ffffff', + chainGroup: ethereumChainGroup, installed: hasInjectedProvider({ flag: 'isTokenary' }), hidden: () => !isSafari(), downloadUrls: { diff --git a/packages/rainbowkit/src/wallets/walletConnectors/trustWallet/trustWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/trustWallet/trustWallet.ts index 3575922920..5c1c0fbabc 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/trustWallet/trustWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/trustWallet/trustWallet.ts @@ -1,4 +1,5 @@ import { isMobile } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, InstructionStepName, @@ -95,6 +96,7 @@ export const trustWallet = ({ installed: isTrustWalletInjected || undefined, iconAccent: '#3375BB', iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { android: 'https://play.google.com/store/apps/details?id=com.wallet.crypto.trustapp', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/uniswapWallet/uniswapWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/uniswapWallet/uniswapWallet.ts index 7b38d7ca62..01c037c404 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/uniswapWallet/uniswapWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/uniswapWallet/uniswapWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; import type { DefaultWalletOptions } from './../../Wallet'; @@ -12,6 +13,7 @@ export const uniswapWallet = ({ name: 'Uniswap Wallet', iconUrl: async () => (await import('./uniswapWallet.svg')).default, iconBackground: '#FFD8EA', + chainGroup: ethereumChainGroup, downloadUrls: { ios: 'https://apps.apple.com/app/apple-store/id6443944476', mobile: 'https://wallet.uniswap.org/', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.ts index 9b81c66327..9dea3489a7 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/valoraWallet/valoraWallet.ts @@ -1,4 +1,5 @@ import { isAndroid } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { DefaultWalletOptions, Wallet } from '../../Wallet'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; @@ -12,6 +13,7 @@ export const valoraWallet = ({ name: 'Valora', iconUrl: async () => (await import('./valoraWallet.svg')).default, iconBackground: '#FFFFFF', + chainGroup: ethereumChainGroup, downloadUrls: { ios: 'https://apps.apple.com/app/id1520414263?mt=8', android: 'https://play.google.com/store/apps/details?id=co.clabs.valora', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.ts index 9a581a3965..600542ee80 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.ts @@ -1,4 +1,5 @@ import type { RainbowKitWalletConnectParameters, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getWalletConnectConnector } from '../../getWalletConnectConnector'; export interface WalletConnectWalletOptions { @@ -18,6 +19,7 @@ export const walletConnectWallet = ({ installed: undefined, iconUrl: async () => (await import('./walletConnectWallet.svg')).default, iconBackground: '#3b99fc', + chainGroup: ethereumChainGroup, qrCode: { getUri }, createConnector: getWalletConnectConnector({ projectId, diff --git a/packages/rainbowkit/src/wallets/walletConnectors/wigwamWallet/wigwamWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/wigwamWallet/wigwamWallet.ts index 8617cd10d9..79b5553d97 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/wigwamWallet/wigwamWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/wigwamWallet/wigwamWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -10,6 +11,7 @@ export const wigwamWallet = (): Wallet => { name: 'Wigwam', rdns: 'com.wigwam.wallet', iconBackground: '#80EF6E', + chainGroup: ethereumChainGroup, iconUrl: async () => (await import('./wigwamWallet.svg')).default, downloadUrls: { chrome: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/xPortalWallet/xPortalWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/xPortalWallet/xPortalWallet.ts index 13c5296715..892cd44aa1 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/xPortalWallet/xPortalWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/xPortalWallet/xPortalWallet.ts @@ -1,4 +1,5 @@ import { isIOS } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -29,6 +30,7 @@ export const xPortalWallet = ({ iconUrl: async () => (await import('./xPortalWallet.svg')).default, iconAccent: '#23f7dd', iconBackground: '#23f7dd', + chainGroup: ethereumChainGroup, installed: !shouldUseWalletConnect ? isXPortalInjected : undefined, downloadUrls: { android: diff --git a/packages/rainbowkit/src/wallets/walletConnectors/xdefiWallet/xdefiWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/xdefiWallet/xdefiWallet.ts index 980eb73ec5..7346a301b5 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/xdefiWallet/xdefiWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/xdefiWallet/xdefiWallet.ts @@ -1,4 +1,5 @@ import type { Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -12,6 +13,7 @@ export const xdefiWallet = (): Wallet => { installed: hasInjectedProvider({ namespace: 'xfi.ethereum' }), iconUrl: async () => (await import('./xdefiWallet.svg')).default, iconBackground: '#fff', + chainGroup: ethereumChainGroup, downloadUrls: { chrome: 'https://chrome.google.com/webstore/detail/xdefi-wallet/hmeobnfnfcmdkdcmlblgagmfpfboieaf', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.ts index 759afa184e..3bdc305cb5 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/zealWallet/zealWallet.ts @@ -1,4 +1,5 @@ import type { DefaultWalletOptions, Wallet } from '../../Wallet'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import { getInjectedConnector, hasInjectedProvider, @@ -21,6 +22,7 @@ export const zealWallet = ({ rdns: 'app.zeal', iconUrl: async () => (await import('./zealWallet.svg')).default, iconBackground: '#fff0', + chainGroup: ethereumChainGroup, iconAccent: '#00FFFF', downloadUrls: { browserExtension: 'https://zeal.app', diff --git a/packages/rainbowkit/src/wallets/walletConnectors/zerionWallet/zerionWallet.ts b/packages/rainbowkit/src/wallets/walletConnectors/zerionWallet/zerionWallet.ts index b5ed7552ad..aefe8ae15f 100644 --- a/packages/rainbowkit/src/wallets/walletConnectors/zerionWallet/zerionWallet.ts +++ b/packages/rainbowkit/src/wallets/walletConnectors/zerionWallet/zerionWallet.ts @@ -1,4 +1,5 @@ import { isIOS } from '../../../utils/isMobile'; +import { ethereumChainGroup } from '../../../utils/chain-groups'; import type { Wallet } from '../../Wallet'; import { getInjectedConnector, @@ -30,6 +31,7 @@ export const zerionWallet = ({ iconUrl: async () => (await import('./zerionWallet.svg')).default, iconAccent: '#2962ef', iconBackground: '#2962ef', + chainGroup: ethereumChainGroup, installed: !shouldUseWalletConnect ? isZerionInjected : undefined, downloadUrls: { android: