From b3f6cc88f02bbc86181f226a376b763e02f82ba9 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 31 Jul 2024 15:13:45 +0200 Subject: [PATCH] add trezor safe 5 support (hwi update still required) --- drongo | 2 +- .../com/sparrowwallet/sparrow/control/UsbStatusButton.java | 4 ++-- .../java/com/sparrowwallet/sparrow/io/SpecterDesktop.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drongo b/drongo index d73d3439..f066b5b6 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit d73d3439f67fe528479b759013529d7049c8cba2 +Subproject commit f066b5b608c4cff8873c776ef9c89e9194ccc332 diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UsbStatusButton.java b/src/main/java/com/sparrowwallet/sparrow/control/UsbStatusButton.java index d9184cfe..bedb042a 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/UsbStatusButton.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/UsbStatusButton.java @@ -27,8 +27,8 @@ public class UsbStatusButton extends MenuButton { public void setDevices(List devices) { for(Device device : devices) { MenuItem deviceItem = new MenuItem(device.getModel().toDisplayString()); - if(!device.isNeedsPinSent() && (device.getModel() == WalletModel.TREZOR_1 || device.getModel() == WalletModel.TREZOR_T || - device.getModel() == WalletModel.TREZOR_SAFE_3 || device.getModel() == WalletModel.KEEPKEY || device.getModel() == WalletModel.BITBOX_02)) { + if(!device.isNeedsPinSent() && (device.getModel() == WalletModel.TREZOR_1 || device.getModel() == WalletModel.TREZOR_T || device.getModel() == WalletModel.TREZOR_SAFE_3 || + device.getModel() == WalletModel.TREZOR_SAFE_5 || device.getModel() == WalletModel.KEEPKEY || device.getModel() == WalletModel.BITBOX_02)) { deviceItem = new Menu(device.getModel().toDisplayString()); MenuItem toggleItem = new MenuItem("Toggle Passphrase" + (!device.getModel().externalPassphraseEntry() ? "" : (device.isNeedsPassphraseSent() ? " Off" : " On"))); toggleItem.setOnAction(event -> { diff --git a/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java b/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java index b33f6c7c..1cf69a3d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/SpecterDesktop.java @@ -108,9 +108,9 @@ public class SpecterDesktop implements WalletImport, WalletExport { WalletModel walletModel = device.getWalletModel(); if(walletModel != null) { keystore.setWalletModel(walletModel); - if(walletModel == WalletModel.TREZOR_1 || walletModel == WalletModel.TREZOR_T || walletModel == WalletModel.TREZOR_SAFE_3 || walletModel == WalletModel.KEEPKEY || + if(walletModel == WalletModel.TREZOR_1 || walletModel == WalletModel.TREZOR_T || walletModel == WalletModel.TREZOR_SAFE_3 || walletModel == WalletModel.TREZOR_SAFE_5 || walletModel == WalletModel.LEDGER_NANO_S || walletModel == WalletModel.LEDGER_NANO_X || walletModel == WalletModel.LEDGER_NANO_S_PLUS || - walletModel == WalletModel.BITBOX_02 || walletModel == WalletModel.COLDCARD) { + walletModel == WalletModel.BITBOX_02 || walletModel == WalletModel.COLDCARD || walletModel == WalletModel.KEEPKEY) { keystore.setSource(KeystoreSource.HW_USB); } else if(walletModel == WalletModel.BITCOIN_CORE) { keystore.setSource(KeystoreSource.SW_WATCH);