Skip to content

feat(trezor): add hidden-wallet passphrase selection and on-chain watcher#574

Open
coreyphillips wants to merge 2 commits into
masterfrom
feat/trezor-hidden-wallet-and-watcher
Open

feat(trezor): add hidden-wallet passphrase selection and on-chain watcher#574
coreyphillips wants to merge 2 commits into
masterfrom
feat/trezor-hidden-wallet-and-watcher

Conversation

@coreyphillips
Copy link
Copy Markdown
Contributor

Description

Adds Trezor hidden-wallet passphrase selection and an on-chain event watcher, built on bitkit-core 0.1.66 (bumped from 0.1.64), which provides the WalletSelection / PassphraseResponse types and the on-chain watcher FFI.

Hidden-wallet / passphrase rework

  • Replaces the old blocking passphrase prompt with a proactive wallet-mode model that mirrors bitkit-android.
  • The user picks Standard, passphrase on phone, or passphrase on device up front via a selector + confirmation dialog.
  • The selection is bound to the THP session at connect time (currentSelection()); legacy (non-THP) devices that re-request the passphrase mid-operation are answered from the same stored value, keeping both paths in lockstep.
  • Switching modes resets the device session (disconnect → reconnect), since the Trezor caches the passphrase for the lifetime of a session.
  • Removes the now-dead needsPassphrasePublisher / submitPassphrase / acknowledgeOnDevicePassphrase plumbing.

On-chain event watcher

  • New "Event Watcher" section subscribes an xpub to live Electrum updates with no device connected. Shows balance, block height, account type, transaction count, recent transactions, and a rolling event log.
  • TrezorEventListener bridges the Rust background callback onto @MainActor.
  • The watcher is torn down on disconnect and on network switch; events from stale watchers are filtered out.

Fixes

  • PIN pad now supports up to 50 digits (the real Trezor limit), with dots that wrap across rows instead of overflowing a single line.

Notes

  • New files are picked up via the project's synchronized file groups (no project.pbxproj wiring needed).
  • No changelog fragment: Trezor is a dev/WIP feature, not part of the production app.

Dependencies

  • bitkit-core 0.1.66 (Package.resolved + project.pbxproj updated).

@coreyphillips coreyphillips requested a review from ovitrif June 1, 2026 16:43
@coreyphillips coreyphillips self-assigned this Jun 1, 2026
@coreyphillips coreyphillips changed the title feat(trezor): add hidden-wallet passphrase selection and on-chain wat… feat(trezor): add hidden-wallet passphrase selection and on-chain watcher Jun 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46bb276bba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Bitkit/Views/Trezor/TrezorConnectedView.swift
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.

1 participant