hide receive tab on whirlpool wallets

This commit is contained in:
Craig Raw 2021-09-10 15:35:40 +02:00
parent 0f9e9d9c35
commit 5895837b60

View file

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