display error message when attempting to mix from account 0 and it is not the master wallet

This commit is contained in:
Craig Raw 2023-11-08 12:29:54 +02:00
parent 995d2c5e4e
commit 218e751333

View file

@ -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<UtxoEntry> selectedEntries = getSelectedUtxos();
WhirlpoolDialog whirlpoolDialog = new WhirlpoolDialog(getWalletForm().getMasterWalletId(), getWalletForm().getWallet(), selectedEntries);
whirlpoolDialog.initOwner(utxosTable.getScene().getWindow());