eth/sign: add missing mock_unlock in tests
What changed, and why it matters
This commit only adds missing test setup calls to two automated unit tests in the Ethereum signing code. It does not change any production firmware behavior, user-facing functionality, or security logic. There is no indication this fixes a vulnerability or affects real devices.
No security action required. Treat as routine test maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds mock_unlocked(); at the start of two Rust async unit tests (test_process_eip1559_payment_request_plain_eth and test_process_eip1559_payment_request_known_erc20) in src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs. This is a test-only fixture that simulates an unlocked device state so the tests can exercise signing code. No production code paths are modified.
Changed components
src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs (unit tests only)Inspect captured patch +2 / −0
diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs
index e09aeb3..b25c58a 100644
--- a/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs
+++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/sign.rs
@@ -1200,6 +1200,7 @@ mod tests {
#[async_test::test]
async fn test_process_eip1559_payment_request_plain_eth() {
+ mock_unlocked();
// Native ETH swaps use the tx recipient/value as the signed source-side output.
const KEYPATH: &[u32] = &[44 + HARDENED, 60 + HARDENED, 0 + HARDENED, 0, 0];
@@ -1276,6 +1277,7 @@ mod tests {
#[async_test::test]
async fn test_process_eip1559_payment_request_known_erc20() {
+ mock_unlocked();
// Known ERC20 swaps decode the transfer recipient/amount and show the token unit.
const KEYPATH: &[u32] = &[44 + HARDENED, 60 + HARDENED, 0 + HARDENED, 0, 0];
// function selector + recipient address (left padded) + token amount
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.