From 55bb6c8caea1aeb1aa9351281b1ad6b0983243e6 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 27 Nov 2026 11:19:41 +0100 Subject: [PATCH 1/4] test: log out the jade during an open session in the locked journey Closing Receive after Verify on Device ends the Jade session, so the sign step reconnected instead of meeting the locked device. The journey now funds from the address Receive shows without verifying, logs out, signs, logs out again and verifies last: a send that completes keeps the session open. Verified: journey run on an Android emulator against the interactive Jade emulator; both legs logged "Marked Jade ... locked" and unlocked on the open session with no reconnect --- journeys/hardware-wallet/README.md | 6 ++--- .../hardware-wallet/jade-device-locked.xml | 25 +++++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/journeys/hardware-wallet/README.md b/journeys/hardware-wallet/README.md index 85ecb35cf3..b6209f401f 100644 --- a/journeys/hardware-wallet/README.md +++ b/journeys/hardware-wallet/README.md @@ -84,7 +84,7 @@ the other three rely on, and `passphrase-settings-remove.xml` removes it again. | `jade-uninitialized.xml` | Jade emulator with no wallet: Found shows the not-set-up message | | `jade-wrong-pin.xml` | Interactive Jade emulator: wrong PIN on the device → Found shows the wrong-PIN message, retry pairs | | `jade-network-mismatch.xml` | Jade emulator restricted to mainnet: Found shows the network message | -| `jade-device-locked.xml` | Interactive Jade logged out on the device after pairing: Verify on Device and Sign With Jade ask for the PIN on the device and retry | +| `jade-device-locked.xml` | Interactive Jade logged out on the device during an open session: Sign With Jade and Verify on Device ask for the PIN on the device and retry | | `jade-psbt-too-large.xml` | Jade with about 200 small inputs: sending all of it shows the too-large message | | `jade-sign-on-device.xml` | Interactive Jade: decline on the device keeps the payment unsent, approve sends it | | `jade-wallet-mismatch.xml` | Paired Jade reseeded: Verify on Device shows the different-wallet message | @@ -178,7 +178,7 @@ uninitialised. USB and Bluetooth transports still need a physical Jade; unit tes The error journeys start the emulator in another state first: `jade-uninitialized.xml` (`JADE_MNEMONIC=`), `jade-wrong-pin.xml` (`JADE_MODE=interactive`, where the device shows its own PIN pad and `./scripts/jade-emulator pin` types on it) and `jade-network-mismatch.xml` -(`JADE_NETWORK=mainnet`), and `jade-device-locked.xml` logs the interactive device out after -pairing, so Verify on Device and then Sign With Jade ask for the PIN on the device again and retry (the send steps need the app on the bitkit-docker Electrum and funds on the Jade); `jade-psbt-too-large.xml` needs the app on the bitkit-docker Electrum and about 200 small +(`JADE_NETWORK=mainnet`), and `jade-device-locked.xml` logs the interactive device out during an open session +twice, so Sign With Jade and then Verify on Device ask for the PIN on the device again and retry (the send steps need the app on the bitkit-docker Electrum); `jade-psbt-too-large.xml` needs the app on the bitkit-docker Electrum and about 200 small inputs on the Jade. `jade-sign-on-device.xml` declines and then approves a payment on the interactive device's own screens. `jade-wallet-mismatch.xml` restarts the emulator with another seed after pairing. `jade-passphrase.xml` starts it with `JADE_PASSPHRASE=always` and pairs the wallet a passphrase typed on the device opens (`./scripts/jade-emulator passphrase`). The bitkit-docker `docs/jade-emulator.md` lists the modes and recipes. diff --git a/journeys/hardware-wallet/jade-device-locked.xml b/journeys/hardware-wallet/jade-device-locked.xml index b870356a66..c0ca1d0d63 100644 --- a/journeys/hardware-wallet/jade-device-locked.xml +++ b/journeys/hardware-wallet/jade-device-locked.xml @@ -4,11 +4,11 @@ next needs the Jade. Requires `JADE_MODE=interactive ./scripts/jade-emulator start` in `bitkit-docker`, a regtest debug build with the Jade emulator enabled (see the README) and no Jade paired. For the send steps, Settings, Advanced, Electrum Server must point at the - `bitkit-docker` Electrum, and the Jade must hold funds there: after pairing, run - `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in - `bitkit-docker`, where `JADE_ADDRESS` is the address Receive shows on the Jade tab. The device answers - the next request with HW_LOCKED, and the app asks for the PIN on the device again and retries, - on Verify on Device and on Sign With Jade. + `bitkit-docker` Electrum. Each log-out happens while the app holds an open Jade session: closing + Receive after Verify on Device ends the session, and so does leaving Send without a sent payment, + so the journey funds from the address Receive shows, signs first and verifies last. The device + answers the next request with HW_LOCKED, and the app asks for the PIN on the device again and + retries, on Sign With Jade and on Verify on Device. @@ -23,26 +23,29 @@ Tap "Connect" (testTag "HardwareWalletFoundConnect"), run `./scripts/jade-emulator pin 012345` in `bitkit-docker`, verify the "Device Connected" step (testTag "HardwareWalletPairedScreen") appears within 30 seconds and tap "Finish" (testTag "HardwareWalletPairedFinish") + + Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker` + Run `./scripts/jade-emulator press front right front` in `bitkit-docker` to choose Session, then Log Out, on the device - Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, then tap "Verify on Device" (testTag "HardwareVerifyAddress") and verify the Jade shows its PIN pad again + Tap Send (testTag "Send"), enter a regtest address of the bitkit-docker node manually, select the Jade as the funding source on the amount screen (testTag "AssetButton-switch"), enter 50 000 sats, tap Continue (testTag "ContinueAmount"), swipe to confirm and tap "Sign With Jade" (testTag "HardwareSendOpenTrezorConnect") - Run `./scripts/jade-emulator pin 012345`, then `./scripts/jade-emulator press right front` once the device shows Verify Address, and verify the button returns to "Verify on Device" with no error + Verify the Jade shows its PIN pad, then run `./scripts/jade-emulator pin 012345` - Close the receive sheet and run `./scripts/jade-emulator press front right front` to log out on the device again + Run `./scripts/jade-emulator press front` to pass the Output screen, then `./scripts/jade-emulator press right front` to sign on Send Transaction, and verify the success screen (testTag "SendSuccess") headed "Bitcoin Sent" appears within 30 seconds, with one payment sent - Tap Send (testTag "Send"), enter a regtest address of the bitkit-docker node manually, select the Jade as the funding source on the amount screen (testTag "AssetButton-switch"), enter 50 000 sats, tap Continue (testTag "ContinueAmount"), swipe to confirm and tap "Sign With Jade" (testTag "HardwareSendOpenTrezorConnect") + Close the success screen and run `./scripts/jade-emulator press front right front` to log out on the device again - Verify the Jade shows its PIN pad, then run `./scripts/jade-emulator pin 012345` + Tap Receive, select the Jade tab, tap "Show Details" if needed, then tap "Verify on Device" (testTag "HardwareVerifyAddress") and verify the Jade shows its PIN pad again - Run `./scripts/jade-emulator press front` to pass the Output screen, then `./scripts/jade-emulator press right front` to sign on Send Transaction, and verify the success screen (testTag "SendSuccess") headed "Bitcoin Sent" appears within 30 seconds, with one payment sent + Run `./scripts/jade-emulator pin 012345`, then `./scripts/jade-emulator press right front` once the device shows Verify Address, and verify the button returns to "Verify on Device" with no error From a1f2310cbde7bca98299a2f4286234ba8fff64b1 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 27 Nov 2026 11:26:28 +0100 Subject: [PATCH 2/4] test: dismiss the received sheet before the locked journey sends Funding the Jade opens the Received Bitcoin sheet over the wallet, so the next step's Send tap could miss. The journey now waits for it and taps Nice!. Verified: xmllint on the journey; the 27 Nov run met and dismissed this sheet at that step --- journeys/hardware-wallet/jade-device-locked.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/journeys/hardware-wallet/jade-device-locked.xml b/journeys/hardware-wallet/jade-device-locked.xml index c0ca1d0d63..66c21b2702 100644 --- a/journeys/hardware-wallet/jade-device-locked.xml +++ b/journeys/hardware-wallet/jade-device-locked.xml @@ -24,7 +24,7 @@ Tap "Connect" (testTag "HardwareWalletFoundConnect"), run `./scripts/jade-emulator pin 012345` in `bitkit-docker`, verify the "Device Connected" step (testTag "HardwareWalletPairedScreen") appears within 30 seconds and tap "Finish" (testTag "HardwareWalletPairedFinish") - Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker` + Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker`. Wait for the "Received Bitcoin" sheet and tap "Nice!" (testTag "ReceivedTransactionButton") Run `./scripts/jade-emulator press front right front` in `bitkit-docker` to choose Session, then Log Out, on the device From 44665d70be2d69d853a7fa2da386814e0b209e06 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 27 Nov 2026 11:52:25 +0100 Subject: [PATCH 3/4] test: name the received sheet button by its tag The button's label is picked at random, so the step names only its test tag. Verified: xmllint on the journey --- journeys/hardware-wallet/jade-device-locked.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/journeys/hardware-wallet/jade-device-locked.xml b/journeys/hardware-wallet/jade-device-locked.xml index 66c21b2702..209669879e 100644 --- a/journeys/hardware-wallet/jade-device-locked.xml +++ b/journeys/hardware-wallet/jade-device-locked.xml @@ -24,7 +24,7 @@ Tap "Connect" (testTag "HardwareWalletFoundConnect"), run `./scripts/jade-emulator pin 012345` in `bitkit-docker`, verify the "Device Connected" step (testTag "HardwareWalletPairedScreen") appears within 30 seconds and tap "Finish" (testTag "HardwareWalletPairedFinish") - Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker`. Wait for the "Received Bitcoin" sheet and tap "Nice!" (testTag "ReceivedTransactionButton") + Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker`. Wait for the "Received Bitcoin" sheet and tap its button (testTag "ReceivedTransactionButton") Run `./scripts/jade-emulator press front right front` in `bitkit-docker` to choose Session, then Log Out, on the device From 96995c88b355063af529d8513baa716cc3606366 Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 27 Nov 2026 13:38:29 +0100 Subject: [PATCH 4/4] test: fund the jade enough for the locked journey send On a fresh chain 0.001 BTC leaves under 100 000 sats spendable, so the 50 000 sat send trips the over-half-balance warning before Sign With Jade. The journey now funds 0.01 BTC, and its description says what it checks: the PIN prompt and retry, not an app message. Verified: xmllint on the journey; self review of origin/master...HEAD --- journeys/hardware-wallet/jade-device-locked.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/journeys/hardware-wallet/jade-device-locked.xml b/journeys/hardware-wallet/jade-device-locked.xml index 209669879e..8b3ec98eb2 100644 --- a/journeys/hardware-wallet/jade-device-locked.xml +++ b/journeys/hardware-wallet/jade-device-locked.xml @@ -1,7 +1,7 @@ - Logs the paired Jade out on the device itself and checks the message the app shows when it - next needs the Jade. Requires `JADE_MODE=interactive ./scripts/jade-emulator start` in + Logs the paired Jade out on the device itself and checks that the app asks for the PIN on the + device and retries when it next needs the Jade. Requires `JADE_MODE=interactive ./scripts/jade-emulator start` in `bitkit-docker`, a regtest debug build with the Jade emulator enabled (see the README) and no Jade paired. For the send steps, Settings, Advanced, Electrum Server must point at the `bitkit-docker` Electrum. Each log-out happens while the app holds an open Jade session: closing @@ -24,7 +24,7 @@ Tap "Connect" (testTag "HardwareWalletFoundConnect"), run `./scripts/jade-emulator pin 012345` in `bitkit-docker`, verify the "Device Connected" step (testTag "HardwareWalletPairedScreen") appears within 30 seconds and tap "Finish" (testTag "HardwareWalletPairedFinish") - Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.001; ./bitcoin-cli -generate 1` in `bitkit-docker`. Wait for the "Received Bitcoin" sheet and tap its button (testTag "ReceivedTransactionButton") + Tap Receive (testTag "Receive"), select the Jade tab, tap "Show Details" if the address is hidden behind it, read the address without tapping "Verify on Device", close the receive sheet and fund it: `./bitcoin-cli sendtoaddress JADE_ADDRESS 0.01; ./bitcoin-cli -generate 1` in `bitkit-docker`. Wait for the "Received Bitcoin" sheet and tap its button (testTag "ReceivedTransactionButton") Run `./scripts/jade-emulator press front right front` in `bitkit-docker` to choose Session, then Log Out, on the device