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))); } } }