Skip to content

Commit da5e872

Browse files
committed
btc: adjust tests to simulator v9.24+ simulating Nova
Since v9.24, the simulator simulates a BitBox02 Nova, as it is a superset of BitBox02.
1 parent bc83a6f commit da5e872

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎tests/test_device.rs‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,20 @@ async fn test_device_info() {
1414
test_simulators_after_pairing(async |paired_bitbox| {
1515
let device_info = paired_bitbox.device_info().await.unwrap();
1616

17-
assert_eq!(device_info.name, "My BitBox");
18-
assert_eq!(paired_bitbox.product(), bitbox_api::Product::BitBox02Multi);
17+
// Since v9.24.0, the simulator simulates a Nova device.
18+
if semver::VersionReq::parse(">=9.24.0")
19+
.unwrap()
20+
.matches(paired_bitbox.version())
21+
{
22+
assert_eq!(
23+
paired_bitbox.product(),
24+
bitbox_api::Product::BitBox02NovaMulti
25+
);
26+
assert_eq!(device_info.name, "BitBox HCXT")
27+
} else {
28+
assert_eq!(paired_bitbox.product(), bitbox_api::Product::BitBox02Multi);
29+
assert_eq!(device_info.name, "My BitBox")
30+
}
1931
})
2032
.await
2133
}

0 commit comments

Comments
 (0)