fix(trezor-client): send empty passphrase for standard wallets#7034
fix(trezor-client): send empty passphrase for standard wallets#7034ifdario wants to merge 1 commit into
Conversation
handle_interaction was sending on_device=true for non-device passphrase requests, which caused the Trezor to prompt for a passphrase even when none is configured. For standard wallets (no passphrase), the correct behavior is to reply with an empty passphrase string.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR fixes a bug in the Trezor client's interaction handler. The Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #7033
handle_interactionincorrectly handlesPassphraseRequestfor standard wallets (no passphrase configured).When
on_device()returnsfalse, the current code callsreq.ack(!on_device)which setson_device = truein thePassphraseAck, causing the Trezor to prompt for passphrase entry on the device even when none is configured.The fix sends an empty passphrase string via
ack_passphrase(String::new())whenon_device()isfalse, which is the correct protocol response for standard (non-hidden) wallets.