From 5e4d6d5a78e8a51ff51071c256c1bea237250564 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 11 May 2022 15:27:02 +0200 Subject: [PATCH] only show mix selected button for p2wpkh wallets --- .../com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java index 5182e189..40082321 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/WhirlpoolServices.java @@ -4,6 +4,7 @@ import com.google.common.eventbus.Subscribe; import com.google.common.net.HostAndPort; import com.samourai.whirlpool.client.wallet.WhirlpoolEventService; import com.sparrowwallet.drongo.Network; +import com.sparrowwallet.drongo.protocol.ScriptType; import com.sparrowwallet.drongo.wallet.DeterministicSeed; import com.sparrowwallet.drongo.wallet.MixConfig; import com.sparrowwallet.drongo.wallet.StandardAccount; @@ -161,6 +162,7 @@ public class WhirlpoolServices { public static boolean canWalletMix(Wallet wallet) { return Whirlpool.WHIRLPOOL_NETWORKS.contains(Network.get()) + && wallet.getScriptType() == ScriptType.P2WPKH && wallet.getKeystores().size() == 1 && wallet.getKeystores().get(0).hasSeed() && wallet.getKeystores().get(0).getSeed().getType() == DeterministicSeed.Type.BIP39