fix(emulator): show confirm button for zcash address + eth verify-message view-on-device#271
Merged
Merged
Conversation
…sage On the emulator there is no physical button, so on-device display/confirm prompts must be wrapped in emuSigningOp() — that installs the ButtonRequest handler that surfaces the Confirm/Reject affordance in the emulator window. Two handlers skipped this gate and hung with no button until the 120s confirm timeout: - zcashDisplayAddress (view Orchard address on device) - ethVerifyMessage (verify message shows msg+address on device) Both now match the gated pattern used by every other getAddress display handler and by tronVerifyMessage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Fix: emulator "view on device" hangs with no confirm button
Reported: in the emulator, Zcash "view address on device" (and similar view-on-device flows) show the OLED screen but have no button to press Accept, so it feels stuck.
Root cause
On a real device the user presses a physical button. On the emulator there's no button, so on-device display/confirm prompts must be wrapped in
emuSigningOp(), which installs theButtonRequesthandler that surfaces the Confirm/Reject affordance in the emulator window (and writes theDebugLinkDecisionpress).Every standard
getAddressdisplay handler does this (engine.isEmulator && params.showDisplay → emuSigningOp). Two handlers skipped the gate and called the wallet directly, so the firmware busy-loops inconfirm_helper()with no UI button until the 120s confirm timeout:zcashDisplayAddress— view Orchard address on device (the reported bug)ethVerifyMessage— verify-message shows the message + address on device and waits for a press (its Tron counterparttronVerifyMessagewas already gated)Fix
Wrap both in
emuSigningOp()whenengine.isEmulator, matching the existing pattern. No behavior change on real devices.Sibling audit
*GetAddressdisplay handlers,ethSignMessage,solanaSignMessage,tonSignMessage,ethSignTypedData,tronVerifyMessage— already gated. ✅ethSignTx/ethSignMessage/ethSignTypedData, ~index.ts:683-685) appears to be a different RPC object and is ungated — needs a separate look to confirm whether it's emulator-reachable.Verification
index.ts).