Browse Source

hide receive tab on whirlpool wallets

terminal
Craig Raw 3 years ago
parent
commit
5895837b60
  1. 8
      src/main/java/com/sparrowwallet/sparrow/wallet/WalletController.java

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

Loading…
Cancel
Save