prepare: don't start daemon if coin config exists in basicswap.json
Some checks are pending
lint / build (3.12) (push) Waiting to run

This commit is contained in:
nahuhh 2024-11-14 04:57:06 +00:00 committed by tecnovert
parent f93fae6696
commit 6be9a14335

View file

@ -2075,12 +2075,6 @@ def main():
if add_coin != '':
logger.info('Adding coin: %s', add_coin)
settings = load_config(config_path)
if tor_control_password is None and settings.get('use_tor', False):
extra_opts['tor_control_password'] = settings.get('tor_control_password', None)
if particl_wallet_mnemonic != 'none':
# Ensure Particl wallet is unencrypted or correct password is supplied
test_particl_encryption(data_dir, settings, chain, use_tor_proxy)
if add_coin in settings['chainclients']:
coin_settings = settings['chainclients'][add_coin]
@ -2096,6 +2090,13 @@ def main():
return 0
exitWithError('{} is already in the settings file'.format(add_coin))
if tor_control_password is None and settings.get('use_tor', False):
extra_opts['tor_control_password'] = settings.get('tor_control_password', None)
if particl_wallet_mnemonic != 'none':
# Ensure Particl wallet is unencrypted or correct password is supplied
test_particl_encryption(data_dir, settings, chain, use_tor_proxy)
settings['chainclients'][add_coin] = chainclients[add_coin]
settings['use_tor_proxy'] = use_tor_proxy