feat: add Trezor emulator bridge#563
Open
ovitrif wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds dev/E2E-only Trezor Bridge transport support so the iOS Trezor dashboard can connect to the deterministic emulator from
synonymdev/bitkit-docker.Bridge mode is guarded behind
TREZOR_BRIDGE=truein Debug/E2E builds, keeps BLE behavior unchanged by default, and addsTREZOR_ELECTRUM_URLfor local regtest Electrum runs.Context: current iOS releases do not expose WebUSB-style access for devices like Trezor in Safari/WebKit, and Trezor's current connected-device path on iOS is Bluetooth for models that support it. The
bitkit-dockertooling still stays the right emulator path for simulator automation because Trezor User Env exposes the deterministic emulator through Bridge on the Mac.Verification Status
This PR has only been compile-verified locally. The full emulator-backed flow against
bitkit-dockerhas been run against #564 with success, instead.Linked Issues/Tasks
Screenshot / Video
N/A
QA Notes
Manual Tests
bitkit-dockermain →docker compose up -d→./scripts/trezor-emulator start: Bridge reports the deterministic emulator athttp://127.0.0.1:21325.TREZOR_BRIDGE=true→ Settings → Advanced → Trezor Hardware Wallet → scan/connect: emulator appears as a Bridge device and connects.regression:Debug app withoutTREZOR_BRIDGE=true→ Settings → Advanced → Trezor Hardware Wallet: BLE scanning and pairing behavior stays unchanged.Automated Checks
swiftformat Bitkit/ViewModels/Trezor/TrezorViewModel.swiftxcodebuild build-for-testing -scheme BitkitAITests -only-testing:BitkitUITests/TrezorBridgeDashboardUITestsTEST_TREZOR_EMU=1emulator-backed UI suite againstbitkit-docker.Review order