Skip to main content
This guide will help you migrate your Privy React SDK from v1.x.x to v2.0.0. To install the latest version, install the package from the latest tag:

New features and improvements 🎉

  • Removed ethers v5 dependency, allowing developers to more easily use ethers v6
  • Added support for submitting transactions without waiting for confirmation
  • Added UIs for Ethereum signTransaction
For the full set of changes check out our changelog.

Breaking changes

Authentication

  • Guaranteed that user.wallet is the first linked wallet on the user object. To maintain state of the latest connected wallet, interact with the wallets array directly.
  • Removed the forkSession method. This feature was experimental and has been removed.
  • Removed the PrivyProvider’s deprecated onSuccess prop - use the onSuccess callback registered via the useLogin hook instead.

Embedded wallets

  • Apps using custom auth providers must now explicitly configure wallet UIs in the dashboard, or use the updated showWalletUIs option.
  • Removed the PrivyProvider’s deprecated createPrivyWalletOnLogin prop. Use config.embeddedWallets.createOnLogin instead.
  • Removed the deprecated additionalChains and rpcConfig props from PrivyProvider config, please configure these via the supportedChains
  • Removed the deprecated noPromptOnSignature configuration option. Configure wallet UIs in the dashboard, or use the updated showWalletUIs option.

EVM

  • Removed the deprecated getEthersProvider and getWeb3jsProvider from the ConnectedWallet class. Use getEthereumProvider instead.
  • Ethereum sendTransaction method now returns a Promise<{hash: string}> instead of a Promise<TransactionReceipt>. To get the full details of the submitted transaction, use a library like viem.
  • Removed the experimental waitForTransactionConfirmation config option as it is the default behavior.
  • Updated signMessage, signTypedData, sendTransaction, and signTransaction methods:

Smart Wallets

  • Updated signMessage, signTypedData, and sendTransaction methods of the smart wallet client:

Solana

  • Migrated useSendSolanaTransaction from @privy-io/react-auth to useSendTransaction from @privy-io/react-auth/solana (Solana-specific export path)
  • Removed sendSolanaTransaction from usePrivy in favor of exporting sendTransaction from useSendTransaction from @privy-io/react-auth/solana
  • Removed delegateWalletAction from useSolanaWallets. Use delegateWallet from useDelegatedActions instead.
  • Removed rpcUrl from fundWallet from useSolanaWallets. Set rpcUrl in config.solanaClusters prop of the PrivyProvider instead

Connectors

  • Removed the setActiveWallet method - use the wallets array directly to interact with wallets.

Callbacks

  • Updated all non-error callbacks to use named arguments instead of positional arguments.