Prerequisites
Before this page: users who sign in to your app (see Post-login user setup) and a Dynamic environment with WaaS enabled.What you’ll build
Some users may still hold an earlier, legacy generation of embedded wallet that should be moved onto Dynamic WaaS. Dynamic provides a ready-made upgrade app that performs the upgrade — the wallet keeps the same address. The@dynamic-labs-sdk/legacy-embedded-wallet-upgrade package wraps the whole flow so you only call functions — it derives the environment from your client, builds the app URL, validates the return URL, and handles the completion handshake. Your job is to:
- Detect which users need the upgrade.
- Route them to the upgrade app — by redirect, by embedding it, or by popup.
- React when the upgrade finishes.
- Redirect to the app — navigate away and read the outcome on return.
- Embed the app (iframe) — render it inline in a sheet or modal.
- Popup (new window) — open it in a separate window. The recommended route for React Native, where it runs in the system auth session.
Install
The React entry point (
/react) has react and @dynamic-labs-sdk/react-hooks as optional peer dependencies. Non-React apps import the root and never pull React in.Detect who needs the upgrade
Two synchronous helpers tell you whether the signed-in user has any wallet that needs upgrading. They read the environment and wallets from your client, so single-client apps call them with no arguments.- TypeScript
- React / React Native
Choose a route
Hosting the app
By default every helper points at Dynamic’s hosted upgrade app. You can run it three ways:- Dynamic-hosted — use the shared Dynamic-hosted deployment as-is (the default; pass nothing).
- Your own subdomain — point a CNAME (e.g.
upgrade.yourapp.com) at the deployment so it runs on your own domain and branding. - Fork & self-host — clone the upgrade app repo, build, and host it yourself.
baseUrl — every entry point accepts it:
Required: allowlist the app’s origin (CORS)
Add the origin serving the app to your environment’s allowed origins in the Dynamic dashboard, or the app’s calls will be blocked:- Your own subdomain / self-host → add your origin (e.g.
https://upgrade.yourapp.com). - Dynamic-hosted → add
https://upgrade-wallet.dynamic.dev.
Custom auth domains
If your environment authenticates through a custom domain (e.g.auth.yourapp.com in place of Dynamic’s default API), the Dynamic-hosted upgrade app only authenticates against that domain once it’s on Dynamic’s internal allowlist. Environments that already had a custom domain configured when Dynamic v5 shipped are allowlisted — the flow works out of the box.
Set up a custom domain more recently and the upgrade fails to reach your API? Reach out to Dynamic to have your domain added to the allowlist. (If you fork and self-host the app, you control this list yourself.)
Smoother UX: skip the extra login
If you serve the app on a subdomain of your app’s domain and your environment uses cookie-based sessions, an already-signed-in user lands in the app already authenticated — no second login. Otherwise the user simply signs in again with the same credential they use in your app.Handling errors
Route-specific errors (blocked/closed popups, etc.) are covered on each route’s page.
See also
- Post-login user setup — detect upgrade needs alongside other post-login steps
- Connected wallets management — the upgraded wallet appears here with the same address
- Wallet backup & recovery — back up the wallet after upgrading