Skip to content

Conversation

@turbocrime
Copy link
Collaborator

@turbocrime turbocrime commented Aug 2, 2025

This PR implements the user interface and onboarding flow for Ledger hardware wallet support. Building on the foundation custody infrastructure, this adds the UI components and onboarding flows. Note: This PR has been split - authorization slice changes have been moved to PR #403.

  • Complete Ledger onboarding UI with device connection flow
  • Reorganized onboarding structure to support multiple custody types
  • Enhanced password management for different wallet types

Key Changes

  • Onboarding Flow: New custody-specific onboarding paths for seed phrase generation, import, and Ledger connection in apps/extension/src/routes/page/onboarding/custody/
  • Ledger Integration: Complete USB device pairing and app communication flow in connect-ledger.tsx:39-88
  • Password Flow: Unified password creation/confirmation handling for different custody types
  • Dependencies: Added Ledger transport and Penumbra app libraries

Onboarding

  • Device pairing flow with USB permission handling
  • Wallet ID display for connected device
  • Reliable error handling and user feedback for USB interruptions

@turbocrime turbocrime force-pushed the ledger-ui branch 4 times, most recently from 8d7950a to 17c7160 Compare August 14, 2025 05:58
@turbocrime turbocrime force-pushed the ledger-ui branch 2 times, most recently from d588630 to 272504f Compare August 16, 2025 12:06
@turbocrime turbocrime marked this pull request as ready for review August 16, 2025 12:06
@turbocrime turbocrime changed the base branch from introduce-custody-ledger to ledger-ui-authorization August 18, 2025 20:11
@turbocrime turbocrime requested a review from TalDerei August 18, 2025 20:12
@turbocrime turbocrime changed the title Ledger UI Ledger UI: Onboarding Aug 18, 2025
@turbocrime turbocrime force-pushed the ledger-ui branch 2 times, most recently from 59bf256 to 90d6ca5 Compare August 18, 2025 21:32
Copy link
Contributor

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

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

I think the onboarding UI changes are more extensive than necessary. The helper slices could have largely remained intact, but this PR opts for a unified restructuring, folding those helper slices into a single consolidated onboarding slice. I won't block on this for the interest of time.

setPhraseLength: (phraseLength: 12 | 24) => {
const { phrase: existingPhrase } = get().onboarding.importPhrase;

const phrase = new Array<string>(phraseLength).map((_, i) => existingPhrase[i] ?? '');
Copy link
Contributor

@TalDerei TalDerei Aug 28, 2025

Choose a reason for hiding this comment

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

comment: this is safer

const phrase = Array.from({ length: phraseLength }, (_, i) => existingPhrase[i] ?? '');

can we make this change?

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.

3 participants