Skip to content

feat(accounts): multi-account support — switcher, add-account flow with recovery choice - #804

Draft
0xnullifier wants to merge 138 commits into
nextfrom
feat/multi-account-support
Draft

feat(accounts): multi-account support — switcher, add-account flow with recovery choice#804
0xnullifier wants to merge 138 commits into
nextfrom
feat/multi-account-support

Conversation

@0xnullifier

@0xnullifier 0xnullifier commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

What

Multi-account support on the home view:

  • Balance card: account chip (Account N · address) with a chevron opens the account switcher; a standalone copy icon keeps address copying; a new "+" button starts the add-account flow.
  • Accounts drawer: now lists all accounts (tap to switch, optimistic with rollback), plus the card-color picker, Settings, and an enabled Add Account entry.
  • Add-account drawer (two steps): Public creates a WalletType.OnChain account immediately; Private swaps to a recovery-choice step — Guardian (routes to the operator picker at /add-account/guardian) or Fully Private (routes to /add-account/private).
  • Local-risk acknowledgment (/add-account/private): three sequential screens, each stating one consequence of a guardian-less account (device loss = permanent fund loss even with the seed phrase saved), each with an "I understand" primary CTA and a "Use a Guardian instead" escape hatch. The final confirm creates the OffChain account.
  • New accounts are auto-named "Account N" and become the active account on creation.

Plumbing

  • CreateAccountRequest carries an optional guardianEndpoint, threaded through both dispatchers → Actions.createHDAccountVault.createHDAccount; an explicitly chosen endpoint wins over the guardian-sibling default.
  • ChooseGuardianScreen gains a submitLoading prop (spinner + re-tap guard on Continue) for callers that create in place.

Testing

  • yarn tsc --noEmit clean; yarn lint:i18n clean.
  • src/components/ui suites pass (AccountsDrawer tests updated for the switch list; barrel test covers the new drawer).
  • Manual walkthrough of all three create paths still pending on a device build.

@0xnullifier
0xnullifier changed the base branch from main to next August 29, 2026 06:24
@0xnullifier
0xnullifier force-pushed the feat/multi-account-support branch from ff4a92a to 25766b4 Compare September 2, 2026 09:27
@0xnullifier
0xnullifier changed the base branch from next to wiktor/e2e-fees-localhost September 2, 2026 09:27
…pport

# Conflicts:
#	.github/actions/inject-linked-guardian-pr/action.yml
#	.github/actions/install-miden-client-cli/action.yml
#	.github/actions/run-local-node/action.yml
#	.github/workflows/e2e-blockchain.yml
#	.github/workflows/warm-node-cache.yml
#	playwright/e2e/helpers/miden-cli.ts
#	playwright/e2e/local-stack/versions.env
#	playwright/e2e/tests/fee-accounting.spec.ts
#	public/_locales/de/de.json
#	public/_locales/de/messages.json
#	public/_locales/en/en.json
#	public/_locales/en/messages.json
#	public/_locales/en_GB/en_GB.json
#	public/_locales/en_GB/messages.json
#	public/_locales/es/es.json
#	public/_locales/es/messages.json
#	public/_locales/fr/fr.json
#	public/_locales/fr/messages.json
#	public/_locales/ja/ja.json
#	public/_locales/ja/messages.json
#	public/_locales/ko/ko.json
#	public/_locales/ko/messages.json
#	public/_locales/pl/messages.json
#	public/_locales/pl/pl.json
#	public/_locales/pt/messages.json
#	public/_locales/pt/pt.json
#	public/_locales/ru/messages.json
#	public/_locales/ru/ru.json
#	public/_locales/tr/messages.json
#	public/_locales/tr/tr.json
#	public/_locales/uk/messages.json
#	public/_locales/uk/uk.json
#	public/_locales/zh_CN/messages.json
#	public/_locales/zh_CN/zh_CN.json
#	public/_locales/zh_TW/messages.json
#	public/_locales/zh_TW/zh_TW.json
#	src/app/pages/Receive/PendingTab.tsx
#	src/app/templates/HomePrompts.tsx
#	src/lib/miden/guardian/direct-switch.test.ts
#	src/lib/miden/guardian/index.test.ts
#	src/lib/miden/guardian/index.ts
#	src/lib/miden/sdk/helpers.ts
#	src/lib/miden/transaction/constants.ts
#	src/lib/miden/transaction/index.ts
#	src/lib/miden/transaction/initiate.ts
#	src/lib/miden/transaction/transactions.guardian.test.ts
#	src/screens/send-flow/SendManager.test.tsx
#	src/screens/send-flow/SendManager.tsx
@0xnullifier
0xnullifier changed the base branch from wiktor/e2e-fees-localhost to next September 7, 2026 19:54
@0xnullifier 0xnullifier closed this Sep 7, 2026
@0xnullifier 0xnullifier reopened this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants