Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.Summary
This hook can be used to upgrade v1 embedded wallet to v2 if a user has existing v1 embedded wallet.Prerequisites
- Make sure to upgrade embedded wallet settings to v2 on your dashboard.
- Make sure to enable automatic embedded wallet creation during sign up.
- (Optional) enable creating wallets for external wallet login, this ensures a seamless upgrade for users with both v1 embedded wallets and third-party wallets like MetaMask. Without this option enabled, v2 wallets will not be created for these users.