chore(rust): simplify `PassphraseRequest` handler
What changed, and why it matters
This is a minor code cleanup in the Rust Trezor client. It simplifies how the software responds when a Trezor device asks for a passphrase. The old code checked whether the device wanted the passphrase entered on the device itself; now it always tells the device to enter the passphrase on the host computer. The commit message says the on-device path is deprecated and no longer used. There is no security-relevant change visible in the diff.
No security action required. Treat as routine refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change removes a conditional in handle_interaction for PassphraseRequest. Previously it called req.on_device() and passed !on_device to req.ack(). Now it always passes true to req.ack(), meaning the host will always handle passphrase entry. The commit message states this is because PassphraseRequest._on_device is false due to deprecation. The diff is a pure simplification with no observable behavior change under the stated deprecation assumption.
Changed components
rust/trezor-client/src/client/common.rsInspect captured patch +1 / −4
diff --git a/rust/trezor-client/src/client/common.rs b/rust/trezor-client/src/client/common.rs
index 897f8497..c9ce2a5e 100644
--- a/rust/trezor-client/src/client/common.rs
+++ b/rust/trezor-client/src/client/common.rs
@@ -221,10 +221,7 @@ pub fn handle_interaction<T, R: TrezorMessage>(resp: TrezorResponse<'_, T, R>) -
TrezorResponse::Failure(_) => resp.ok(), // assering ok() returns the failure error
TrezorResponse::ButtonRequest(req) => handle_interaction(req.ack()?),
TrezorResponse::PinMatrixRequest(_) => Err(Error::UnsupportedNetwork),
- TrezorResponse::PassphraseRequest(req) => handle_interaction({
- let on_device = req.on_device();
- req.ack(!on_device)?
- }),
+ TrezorResponse::PassphraseRequest(req) => handle_interaction(req.ack(true)?),
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.