@ -205,10 +205,8 @@ public class ServerPreferencesController extends PreferencesDetailController {
} ) ;
coreMultiWallet . selectedProperty ( ) . addListener ( ( observable , oldValue , newValue ) - > {
coreWallet . setText ( " " ) ;
coreWallet . setText ( "" ) ;
config . setCoreMultiWallet ( newValue ) ;
coreWallet . setDisable ( ! newValue ) ;
coreWallet . setPromptText ( newValue ? "" : "Default" ) ;
} ) ;
electrumUseSsl . selectedProperty ( ) . addListener ( ( observable , oldValue , newValue ) - > {
@ -307,12 +305,15 @@ public class ServerPreferencesController extends PreferencesDetailController {
}
}
coreMultiWallet . setSelected ( true ) ;
coreMultiWallet . setSelected ( config . getCoreWallet ( ) ! = null ) ;
if ( config . getCoreWallet ( ) ! = null ) {
coreWallet . setPromptText ( "Default" ) ;
if ( config . getCoreWallet ( ) = = null ) {
coreWallet . setText ( Bwt . DEFAULT_CORE_WALLET ) ;
} else {
coreWallet . setText ( config . getCoreWallet ( ) ) ;
}
coreMultiWallet . setSelected ( config . getCoreMultiWallet ( ) ! = Boolean . FALSE ) ;
String electrumServer = config . getElectrumServer ( ) ;
if ( electrumServer ! = null ) {
Protocol protocol = Protocol . getProtocol ( electrumServer ) ;
@ -452,10 +453,6 @@ public class ServerPreferencesController extends PreferencesDetailController {
( Control c , String newValue ) - > ValidationResult . fromErrorIf ( c , "Core pass required" , coreAuthToggleGroup . getSelectedToggle ( ) . getUserData ( ) = = CoreAuthType . USERPASS & & newValue . isEmpty ( ) )
) ) ;
validationSupport . registerValidator ( coreWallet , Validator . combine (
( Control c , String newValue ) - > ValidationResult . fromErrorIf ( c , "Core wallet required" , coreMultiWallet . isSelected ( ) & & newValue . isEmpty ( ) )
) ) ;
validationSupport . registerValidator ( electrumHost , Validator . combine (
( Control c , String newValue ) - > ValidationResult . fromErrorIf ( c , "Invalid Electrum host" , getHost ( newValue ) = = null )
) ) ;