mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 13:26:44 +00:00
fix regtest public server preference regression
This commit is contained in:
parent
fd9e19d052
commit
f1b3f7d5dd
1 changed files with 4 additions and 2 deletions
|
@ -359,9 +359,11 @@ public class ServerPreferencesController extends PreferencesDetailController {
|
|||
});
|
||||
|
||||
PublicElectrumServer configPublicElectrumServer = PublicElectrumServer.fromUrl(config.getPublicElectrumServer());
|
||||
if(configPublicElectrumServer == null) {
|
||||
if(configPublicElectrumServer == null && PublicElectrumServer.supportedNetwork()) {
|
||||
List<PublicElectrumServer> servers = PublicElectrumServer.getServers();
|
||||
publicElectrumServer.setValue(servers.get(new Random().nextInt(servers.size())));
|
||||
if(!servers.isEmpty()) {
|
||||
publicElectrumServer.setValue(servers.get(new Random().nextInt(servers.size())));
|
||||
}
|
||||
} else {
|
||||
publicElectrumServer.setValue(configPublicElectrumServer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue