mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
constrain mix from and mix to options to match those supported in the whirlpool client
This commit is contained in:
parent
eb012f638e
commit
23fd597ca5
3 changed files with 4 additions and 2 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
|||
Subproject commit 61b2fd21e6f623850ad8b5df9f0cec4a0c0908cc
|
||||
Subproject commit c04c24945000f8f3c702801cea1c9921cc60cbbd
|
|
@ -1,5 +1,6 @@
|
|||
package com.sparrowwallet.sparrow.wallet;
|
||||
|
||||
import com.sparrowwallet.drongo.protocol.ScriptType;
|
||||
import com.sparrowwallet.drongo.wallet.MixConfig;
|
||||
import com.sparrowwallet.drongo.wallet.StandardAccount;
|
||||
import com.sparrowwallet.drongo.wallet.Wallet;
|
||||
|
@ -44,6 +45,7 @@ public class MixToController implements Initializable {
|
|||
allWallets.add(NONE_WALLET);
|
||||
|
||||
List<Wallet> destinationWallets = AppServices.get().getOpenWallets().keySet().stream().filter(openWallet -> openWallet.isValid()
|
||||
&& (openWallet.getScriptType() == ScriptType.P2WPKH || openWallet.getScriptType() == ScriptType.P2WSH || openWallet.getScriptType() == ScriptType.P2TR)
|
||||
&& openWallet != wallet && openWallet != wallet.getMasterWallet()
|
||||
&& (openWallet.getStandardAccountType() == null || !StandardAccount.WHIRLPOOL_ACCOUNTS.contains(openWallet.getStandardAccountType()))).collect(Collectors.toList());
|
||||
allWallets.addAll(destinationWallets);
|
||||
|
|
|
@ -137,7 +137,7 @@ public class WhirlpoolServices {
|
|||
&& wallet.getKeystores().get(0).hasSeed()
|
||||
&& wallet.getKeystores().get(0).getSeed().getType() == DeterministicSeed.Type.BIP39
|
||||
&& wallet.getStandardAccountType() != null
|
||||
&& !wallet.isWhirlpoolMixWallet();
|
||||
&& StandardAccount.MIXABLE_ACCOUNTS.contains(wallet.getStandardAccountType());
|
||||
}
|
||||
|
||||
public static void prepareWhirlpoolWallet(Wallet decryptedWallet, String walletId, Storage storage) {
|
||||
|
|
Loading…
Reference in a new issue