From 218e7513335cfce0499734c01a2b0641e298f830 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 8 Nov 2023 12:29:54 +0200 Subject: [PATCH] display error message when attempting to mix from account 0 and it is not the master wallet --- .../com/sparrowwallet/sparrow/wallet/UtxosController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java index 532c822b..29b514b6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/UtxosController.java @@ -278,6 +278,11 @@ public class UtxosController extends WalletFormController implements Initializab } public void mixSelected(ActionEvent event) { + if(!getWalletForm().getWallet().isMasterWallet() && getWalletForm().getWallet().getStandardAccountType() == StandardAccount.ACCOUNT_0) { + showErrorDialog("Invalid Whirlpool wallet", "Create a new wallet with Account #0 as the first account."); + return; + } + List selectedEntries = getSelectedUtxos(); WhirlpoolDialog whirlpoolDialog = new WhirlpoolDialog(getWalletForm().getMasterWalletId(), getWalletForm().getWallet(), selectedEntries); whirlpoolDialog.initOwner(utxosTable.getScene().getWindow());