From e298033cbbfccbda7a42ce9040a063be3d2c108a Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 3 May 2024 12:16:01 +0200 Subject: [PATCH] add further restriction for checking if keystores can sign a psbt input --- src/main/java/com/sparrowwallet/drongo/wallet/Keystore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/Keystore.java b/src/main/java/com/sparrowwallet/drongo/wallet/Keystore.java index 19e3fee..7c47553 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/Keystore.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/Keystore.java @@ -13,6 +13,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; public class Keystore extends Persistable { @@ -252,7 +253,7 @@ public class Keystore extends Persistable { } } - if(derivation.size() == 2) { + if(derivation.size() == 2 && KeyPurpose.fromChildNumber(derivation.get(0)) != null) { return getPubKey(new WalletNode(KeyDerivation.writePath(derivation))); } }