From 5895837b6089a270e25a71c831654fd6e8c7d79a Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 10 Sep 2021 15:35:40 +0200 Subject: [PATCH] hide receive tab on whirlpool wallets --- .../sparrowwallet/sparrow/wallet/WalletController.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java index 19f8251d..825781aa 100644 --- a/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java +++ b/src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java @@ -73,6 +73,11 @@ public class WalletController extends WalletFormController implements Initializa } }); + for(Toggle toggle : walletMenu.getToggles()) { + ToggleButton toggleButton = (ToggleButton) toggle; + toggleButton.managedProperty().bind(toggleButton.visibleProperty()); + } + configure(walletForm.getWallet()); } @@ -90,7 +95,8 @@ public class WalletController extends WalletFormController implements Initializa toggle.setSelected(true); } - ((ToggleButton)toggle).setDisable(!validWallet || (whirlpoolChildWallet && toggle.getUserData().equals(Function.RECEIVE))); + ((ToggleButton)toggle).setDisable(!validWallet); + ((ToggleButton)toggle).setVisible(!(whirlpoolChildWallet && toggle.getUserData().equals(Function.RECEIVE))); } } }