Ensure remote_daemon_urls appears in settings if automatically_select_daemon is present.

This commit is contained in:
tecnovert
2024-02-22 01:44:25 +02:00
parent b0d169421f
commit a78880bc98
3 changed files with 31 additions and 19 deletions

View File

@@ -6401,13 +6401,15 @@ class BasicSwap(BaseApp):
remotedaemonurls.add(url.strip())
if set(settings_cc.get('remote_daemon_urls', [])) != remotedaemonurls:
if len(remotedaemonurls) == 0 and 'remote_daemon_urls' in settings_cc:
del settings_cc['remote_daemon_urls']
else:
settings_cc['remote_daemon_urls'] = list(remotedaemonurls)
settings_cc['remote_daemon_urls'] = list(remotedaemonurls)
settings_changed = True
suggest_reboot = True
# Ensure remote_daemon_urls appears in settings if automatically_select_daemon is present
if 'automatically_select_daemon' in settings_cc and 'remote_daemon_urls' not in settings_cc:
settings_cc['remote_daemon_urls'] = []
settings_changed = True
if 'fee_priority' in data:
new_fee_priority = data['fee_priority']
ensure(new_fee_priority >= 0 and new_fee_priority < 4, 'Invalid priority')