diff --git a/src/main/java/com/sparrowwallet/sparrow/io/satochip/SatoCardApi.java b/src/main/java/com/sparrowwallet/sparrow/io/satochip/SatoCardApi.java index 132de40d..09e03da9 100644 --- a/src/main/java/com/sparrowwallet/sparrow/io/satochip/SatoCardApi.java +++ b/src/main/java/com/sparrowwallet/sparrow/io/satochip/SatoCardApi.java @@ -164,19 +164,12 @@ public class SatoCardApi extends CardApi { for(PSBTInput psbtInput : psbt.getPsbtInputs()) { if(!psbtInput.isSigned()) { WalletNode signingNode = signingNodes.get(psbtInput); - String fullPath = null; List keystores = wallet.getKeystores(); - for(int i = 0; i < keystores.size(); i++) { - Keystore keystore = keystores.get(i); - WalletModel walletModel = keystore.getWalletModel(); - if(walletModel == WalletModel.SATOCHIP) { - String basePath = keystore.getKeyDerivation().getDerivationPath(); - String extendedPath = signingNode.getDerivationPath().substring(1); - fullPath = basePath + extendedPath; - keystore.getPubKey(signingNode); - break; - } - } + // recover full derivation path + Keystore keystore = keystores.get(0); + String basePath = keystore.getKeyDerivation().getDerivationPath(); + String extendedPath = signingNode.getDerivationPath().substring(1); + String fullPath = basePath + extendedPath; psbtInput.sign(new CardPSBTInputSigner(signingNode, fullPath)); }