Releases: rainbow-me/rainbowkit
@rainbow-me/[email protected]
Patch Changes
- ee81177: Support deep linking of wallet interactions for WalletConnect on Android
@rainbow-me/[email protected]
Patch Changes
- 33a2dd7: Automatically connect to the first chain in the
chains
array to avoid presenting the "Wrong network" state immediately after connecting
@rainbow-me/[email protected]
Patch Changes
-
9d431fb: Update react-remove-scroll to v2.5.4 to fix an issue with scrollbar space preservation when the modal is opened.
More detail: theKashey/react-remove-scroll#71.
-
11ed088: Abbreviate large account balances using standard k/m/b units, fixes cases where balances appeared in exponential notation.
@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.