Skip to content

feat(wallet): implement multi-wallets#1097

Open
JulesFiliot wants to merge 22 commits intomainfrom
feat/multi-wallet
Open

feat(wallet): implement multi-wallets#1097
JulesFiliot wants to merge 22 commits intomainfrom
feat/multi-wallet

Conversation

@JulesFiliot
Copy link
Copy Markdown
Contributor

@JulesFiliot JulesFiliot commented Apr 8, 2026

Summary:

  • Multi-wallet support - users can create/import additional wallets after initial onboarding
  • WalletAccountSelector dropdown in portfolio header for switching wallets and accessing create/import flows
  • New /wallet-flow/new and /wallet-flow/import routes - reuse onboarding flow components but skip password creation (prompt existing password via modal instead)
  • Onboarding UI extracted into reusable components (CreateWalletFlow, ImportWalletFlow, CreatePasswordStep, BackButton, OnboardingFlowLayout)
  • Data model: activeAccounts renamed to accounts, added selectedAccountAddress field; normalizeWallet() handles legacy compatibility
  • wallet.add / wallet.import API: name and password now optional when vault exists; names auto-increment (Wallet 1, Wallet 2, etc.)
  • Wallet context exposes currentAccount derived from selected wallet; selected wallet ID persisted to local storage
  • Route guard: /wallet-flow/* redirects to /onboarding when no wallets exist

To test:

  • Legacy data: if you have existing wallets with the old activeAccounts field, verify they load and normalize correctly (basically you can switch between them, etc.)
  • Legacy persistence: select a wallet -> close/reopen extension -> same wallet still selected
  • Wipe local storage to get fresh install (this will remove all your stored private keys from the extension ‼️): dev console -> Application -> Storage -> Extension Storage -> Local -> Clear All
  • Fresh onboarding (create): no wallet -> /onboarding/new -> set password -> lands on portfolio
  • Fresh onboarding (import): no wallet -> /onboarding/import -> enter phrase & password -> lands on portfolio
  • Create additional wallet: portfolio -> wallet selector -> "Create wallet" -> confirm password modal -> new wallet selected, toast shown
  • Import additional wallet: wallet selector -> "Import wallet" -> enter phrase -> confirm password modal -> imported wallet selected, toast shown
  • Wallet switching: switch between wallets in dropdown -> portfolio data updates accordingly (address, assets, etc.)
  • Persistence: select non-default wallet -> close/reopen extension -> same wallet still selected
  • Route guards: /wallet-flow/new with no wallets -> redirects to /onboarding; /onboarding with wallets -> redirects to portfolio

Screenshots

  • WalletAccountSelector:
image
  • Added a tooltip on address hover to show the current account's name of the selected wallet (will be useful for multi-wallet feature):
image

Extend wallet metadata & API with selected account persistence and normalization for legacy activeAccounts
Update WalletProvider to expose/select current account and persist selections
Replace first-account assumptions in portfolio and signer flows with selected account
Implement wallet selector UI and integrate into splitted layout
Update import and create wallet hooks to use optional password to match new API props
Componentize create/import flows and create non-onboarding cases
Use previously componentized flows for create/import wallet onboarding flows
Add create/import wallet routes for non-onboarding flows. Enables wallet setup outside of the initial onboarding flow
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
status-api Ready Ready Preview, Comment Apr 15, 2026 11:08am
status-network-hub Ready Ready Preview, Comment Apr 15, 2026 11:08am
status-network-website Ready Ready Preview, Comment Apr 15, 2026 11:08am
status-portfolio Ready Ready Preview, Comment Apr 15, 2026 11:08am
status-website Ready Ready Preview, Comment Apr 15, 2026 11:08am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
community-dapp-new Ignored Ignored Preview Apr 15, 2026 11:08am
status-components Ignored Ignored Preview Apr 15, 2026 11:08am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: d23b4f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@status-im/wallet Patch
wallet Patch
status.app Patch
hub Patch
portfolio Patch
api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@status-im-auto
Copy link
Copy Markdown
Member

status-im-auto commented Apr 8, 2026

Jenkins Builds

Click to see older builds (6)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2f096e3 1 2026-04-08 09:36:10 ~1 min wallet 📦zip
✔️ 06b53bf 3 2026-04-09 03:06:43 ~43 sec connector 📦zip
✔️ 06b53bf 3 2026-04-09 03:07:28 ~1 min wallet 📦zip
✔️ ddaa5b1 4 2026-04-09 03:21:06 ~1 min wallet 📦zip
✔️ 05dadc2 5 2026-04-13 07:00:29 ~44 sec connector 📦zip
✔️ 05dadc2 5 2026-04-13 07:01:16 ~1 min wallet 📦zip
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a1cfea7 6 2026-04-15 11:01:01 ~1 min wallet 📦zip
✔️ d23b4f5 7 2026-04-15 11:06:53 ~44 sec connector 📦zip
✔️ d23b4f5 7 2026-04-15 11:07:40 ~1 min wallet 📦zip

@JulesFiliot JulesFiliot marked this pull request as ready for review April 13, 2026 06:59
@jinhojang6
Copy link
Copy Markdown
Collaborator

Screenshot 2026-04-15 at 1 27 12 AM

Nice work, the testing guide worked well. Can we have multiple accounts in a wallet like MetaMask?

Comment thread apps/wallet/src/providers/wallet-context.tsx
Comment thread apps/wallet/src/hooks/use-portfolio.ts Outdated
Comment thread apps/wallet/src/providers/signer-context.tsx Outdated
Comment thread apps/wallet/src/components/wallet-selector.tsx
Comment thread apps/wallet/src/routes/wallet-flow/_layout.tsx Outdated
Comment thread apps/wallet/src/hooks/use-wallet-flow-success.ts Outdated
Comment thread apps/wallet/src/components/onboarding/create-wallet-flow.tsx
Comment thread apps/wallet/src/providers/wallet-context.tsx
@jkbktl
Copy link
Copy Markdown
Collaborator

jkbktl commented Apr 14, 2026

Was the final design decision discussed with design team? Why wasn't sidebar used in the end?

Comment current account's name tooltip displayed on address hover. Since multi-account support is not implemented yet, this feature is more confusing than helpful.
Replace all use of currently selected account name by currently selected wallet name. The purpose is to avoid any confusion in the UI/UX between accounts and wallets.
Since we don't have multi-account support right now, rename to wallet-selector to make it explicist and avoid any confusion.
There was no point in having `wallet-flow` as an existing route, it was a mistake.
invalidateQueries will already handle the refetch for active queries.
Legacy wallets stored with the default name "Account 1" are now
automatically renamed to the next available "Wallet N" during
normalization. The rename is persisted to the store so it only
runs once per legacy wallet.
@JulesFiliot
Copy link
Copy Markdown
Contributor Author

@jkbktl @jinhojang6

  • As discussed I kept the current design over the sidebar design which is confusing.
  • Updated the code so UI only mentions Wallet X and not Account X to avoid any confusion (for dApp connection as well, see screenshot).
  • Commented out the tooltip on account's address hover and added TODOs for when multi-account support is ready.
  • Removed /wallet-flow as a route, it is ok that it returns a blank page (it's the default not found, we need to create a custom one) but it was not okay that this route actually existed. (Thanks for the good catch @jinhojang6)
  • Removed the useless refetchQueries. (Thanks for the good catch @jkbktl)
  • Factorize code in apps/wallet/src/components/onboarding/create-wallet-flow.tsx by updating and using apps/wallet/src/components/onboarding/create-wallet-flow.tsx. (Thanks for the good catch @jkbktl)
  • Extended the wallet normalization by adding renameLegacyWallets to rename all legacy wallets named "Account 1" to "Wallet X" with X being the next available positive integer. The purpose being to avoid confusion again. (Previously new wallets were automatically created/imported with the name "Account 1").
  • Added guards to not run through normalization or wallet renaming if not necessary.

Here are all the latest changes: https://github.com/status-im/status-web/pull/1097/changes/05dadc2a4cb4de106ede249c7a570f169d3df7b1..a1cfea77f70fae6ba683fcb25c1eb845d22e184c

image

@JulesFiliot
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to packages/wallet/components/?

Copy link
Copy Markdown
Collaborator

@jinhojang6 jinhojang6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only UX feedback I have is that we could use a different icon for each wallet, like metamask does. Currently all wallets use the same icon (emoji?).

Image

@github-project-automation github-project-automation bot moved this from In Progress to Waiting in Web & User Interfaces Apr 16, 2026
@JulesFiliot
Copy link
Copy Markdown
Contributor Author

LGTM. The only UX feedback I have is that we could use a different icon for each wallet, like metamask does. Currently all wallets use the same icon (emoji?). -- @jinhojang6

Yes good point, I think we can circle back to the emoji/icon question when implementing the multi-account feature. Because when implementing the multi-account feature the design might look too dense with icons for wallets & accounts (not sure what the UI/UX will be though). By the way, I believe Metamask only shows icons for accounts, not wallets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting

Development

Successfully merging this pull request may close these issues.

multi wallet

4 participants