add bitbox02 attestation failed dialog

This commit is contained in:
Craig Raw
2026-08-04 14:54:50 +02:00
parent 32f7e58f9e
commit 1a810c0620
2 changed files with 16 additions and 1 deletions
+1 -1
Submodule lark updated: a246d87cca...ddffe556f0
@@ -541,12 +541,27 @@ public class Hwi {
}
private static final class BitBoxFxNoiseConfig extends BitBoxFileNoiseConfig {
private static final AtomicBoolean attestationWarningShown = new AtomicBoolean(false);
private BitBoxPairingDialog pairingDialog;
public BitBoxFxNoiseConfig() {
super(Path.of(Storage.getDataHome().getAbsolutePath(), LARK_HOME_DIR, BITBOX_FILENAME).toFile());
}
@Override
public void attestationCheck(boolean result) {
if(!result) {
log.warn("BitBox02 attestation check failed, device may not be genuine");
//Devices are opened repeatedly while enumerating, so warn only once per session
if(attestationWarningShown.compareAndSet(false, true)) {
Platform.runLater(() -> AppServices.showWarningDialog("BitBox02 Attestation Failed",
"This BitBox02 did not pass the attestation check, which means it may not be a genuine device.\n\n" +
"Do not use it to store funds until you have verified it externally."));
}
}
}
@Override
public boolean showPairing(String code, DeviceResponse response) throws DeviceException {
CountDownLatch latch = new CountDownLatch(1);