feat(trezor): add hidden-wallet passphrase selection and on-chain watcher#574
feat(trezor): add hidden-wallet passphrase selection and on-chain watcher#574coreyphillips wants to merge 11 commits into
Conversation
|
Starting review |
jvsena42
left a comment
There was a problem hiding this comment.
could've reused existing UI components like CaptionMText / CaptionText / BodySText / FootnoteText / PrimaryButtonView / SecondaryButtonView / RectangleButton
Not blocking for this PR because the previous Trezor dev screens were also implemented like this, but could be a follow up PR
…count-type change
This comment was marked as resolved.
This comment was marked as resolved.
Addressed in this commit. |
There was a problem hiding this comment.
Tested
- Test vectors
- Taproot
- Set tpub
- Don't recognized in auto mode (expected)
- switch to Taproot type
- Transactions and balance tracked
- Received taproot transaction
- Event recognized
- Mined 1 block
- Confirmed and unconfirmed balances updated
- Native Segwit
- Set pub
- Auto mode worked
- switch to Segwit type
- Transactions and balance tracked
- Received segwit transaction
- Event recognized
- Mined 1 block
- Confirmed and unconfirmed balances updated
| .task { | ||
| trezor.setup() | ||
| } | ||
| .onDisappear { |
There was a problem hiding this comment.
Could we move this cleanup to TrezorRootView or another stable parent that only disappears when the whole Trezor dashboard closes? TrezorContentSwitcher switches between TrezorConnectedView and TrezorDeviceListView when trezor.isConnected changes, so this can call handleDashboardDismiss() during normal connect/disconnect and stop/clear the watcher even though disconnect() says it should survive disconnects.
| shouldStopStartingWatcher = true | ||
| } | ||
|
|
||
| guard let watcherId = activeWatcherId else { return } |
There was a problem hiding this comment.
Could we also clear or quarantine startingWatcherId when stopWatcher() is called before activeWatcherId exists? Right now network changes and dashboard cleanup only set shouldStopStartingWatcher, but handleWatcherEvent() still accepts events for startingWatcherId, so a canceled startup can still repopulate balance or transaction state until the native start call returns.
…ine canceled startups
Description
Adds Trezor hidden-wallet passphrase selection and an on-chain event watcher, built on bitkit-core
0.1.66(bumped from0.1.64), which provides theWalletSelection/PassphraseResponsetypes and the on-chain watcher FFI.Hidden-wallet / passphrase rework
currentSelection()); legacy (non-THP) devices that re-request the passphrase mid-operation are answered from the same stored value, keeping both paths in lockstep.needsPassphrasePublisher/submitPassphrase/acknowledgeOnDevicePassphraseplumbing.On-chain event watcher
TrezorEventListenerbridges the Rust background callback onto@MainActor.Fixes
Changelog
changelog.d/next/574.added.md.Dependencies
0.1.66(Package.resolved+project.pbxprojupdated).