Releases: rainbow-me/rainbowkit
@rainbow-me/[email protected]
Minor Changes
-
233a6d7: Breaking: Removed the
chainId
parameter fromcreateConnector
on theWallet
type (Custom Wallets).Note that all built-in wallets are using the new API. Most consumers will be unaffected. This change only affects consumers that have created/consumed custom wallets.
If you previously derived RPC URLs from the
chainId
oncreateConnector
, you can now remove that logic aswagmi
now handles RPC URLs internally when used withconfigureChains
.import { connectorsForWallets, wallet, Chain, Wallet } from '@rainbow-me/rainbowkit'; import { chain, configureChains } from 'wagmi'; import { alchemyProvider } from 'wagmi/providers/alchemy'; import { publicProvider } from 'wagmi/providers/public'; import { WalletConnectConnector } from 'wagmi/connectors/walletConnect'; export interface MyWalletOptions { chains: Chain[]; } -const chains = [chain.mainnet] +const { chains } = configureChains( + [chain.mainnet], + [ + alchemyProvider({ alchemyId: process.env.ALCHEMY_ID }), + publicProvider(), + ] +); export const rainbow = ({ chains }: MyWalletOptions): Wallet => ({ ... - createConnector: ({ chainId }) => { + createConnector: () => { - const rpc = chains.reduce( - (rpcUrlMap, chain) => ({ - ...rpcUrlMap, - [chainId]: chain.rpcUrls.default, - }), - {} - ); const connector = new WalletConnectConnector({ chains, options: { qrcode: false, - rpc, }, }); } ... } const connectors = connectorsForWallets([ { groupName: 'Recommended', wallets: [ rainbow({ chains }), ], }, ]);
@rainbow-me/[email protected]
Patch Changes
-
ce473cd: Fix WalletConnect in Brave when a large number of WalletConnect-based wallets have been configured
Brave’s fingerprint prevention logic silently blocks WebSocket connections if too many are opened in the same session. Since we create a fresh WalletConnect connector instance for each wallet, consumers that have configured a large number of wallets can inadvertently break the connection flow in Brave.
To fix this, we now share WalletConnect connector instances between wallets when the connectors are being provided with the same options.
@rainbow-me/[email protected]
Patch Changes
-
867067c: Improve deep linking support for WalletConnect-based wallets on iOS
We now store the wallet’s universal link URL in local storage so that WalletConnect can use it for deep linking. This is typically handled by the official WalletConnect modal, but we need to handle it ourselves when rendering custom QR codes within RainbowKit.
@rainbow-me/[email protected]
Patch Changes
-
fd5e8e7: Fix npm user agent detection
We try to detect the package manager being used for the init/create script but we were failing to detect npm correctly, instead falling through to using
pnpm
,yarn
ornpm
(in that order) depending on availability. The logic for detecting npm has now been fixed. -
fd5e8e7: Fix install step in Yarn
The
install
command for@rainbow-me/create-rainbowkit
was failing when usingyarn create
because Yarn usesadd
instead ofinstall
, so we now use the correct command when Yarn is detected.
@rainbow-me/[email protected]
@rainbow-me/[email protected]
@rainbow-me/[email protected]
@rainbow-me/[email protected]
Patch Changes
- 2834f97: Initial beta release
@rainbow-me/[email protected]
Patch Changes
-
4be196e: Ensure Brave Wallet and Tokenary aren’t detected as MetaMask
Both Brave Wallet and Tokenary set
window.ethereum.isMetaMask
totrue
which causes issues with the logic for providing the fallback "Injected Wallet" option. Similar to wagmi, we now detect when MetaMask is being impersonated by these wallets. -
7403fab: Add dialog overlay blurs to the theme
-
4be196e: Add Brave Wallet support
Brave Wallet is now included as part of the default set of wallets returned from
getDefaultWallets
, but note that is only visible within the Brave browser to avoid prompting users to download an entirely different web browser.Brave Wallet is also included as part of the
wallet
object to support its usage in custom wallet lists, e.g.wallet.brave({ chains, shimDisconnect: true })
.
@rainbow-me/[email protected]
Patch Changes
- a921853: Add
disclaimer
to theappInfo
property inRainbowKitProvider
, which displays a custom disclaimer at the bottom of the connection modal's welcome screen