mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 10:28:10 +01:00
preparescript: Fix addcoin
This commit is contained in:
@@ -783,7 +783,7 @@ def initialise_wallets(particl_wallet_mnemonic, with_coins, data_dir, settings,
|
||||
with open(os.path.join(data_dir, 'basicswap.log'), 'a') as fp:
|
||||
swap_client = BasicSwap(fp, data_dir, settings, chain)
|
||||
|
||||
start_daemons = with_coins
|
||||
start_daemons = {c for c in with_coins}
|
||||
if 'particl' not in with_coins:
|
||||
# Particl must be running to initialise a wallet in addcoin mode
|
||||
start_daemons.add('particl')
|
||||
@@ -808,7 +808,7 @@ def initialise_wallets(particl_wallet_mnemonic, with_coins, data_dir, settings,
|
||||
swap_client.waitForDaemonRPC(c, with_wallet=False)
|
||||
# Create wallet if it doesn't exist yet
|
||||
wallets = swap_client.callcoinrpc(c, 'listwallets')
|
||||
if 'wallet.dat' not in wallets:
|
||||
if len(wallets) < 1:
|
||||
logger.info('Creating wallet.dat for {}.'.format(coin_name.capitalize()))
|
||||
swap_client.callcoinrpc(c, 'createwallet', ['wallet.dat'])
|
||||
|
||||
@@ -1171,7 +1171,7 @@ def main():
|
||||
prepareDataDir(add_coin, settings, chain, particl_wallet_mnemonic, extra_opts)
|
||||
|
||||
if particl_wallet_mnemonic not in ('none', 'auto'):
|
||||
initialise_wallets(None, [add_coin, ], data_dir, settings, chain, use_tor_proxy)
|
||||
initialise_wallets(None, {add_coin, }, data_dir, settings, chain, use_tor_proxy)
|
||||
|
||||
with open(config_path, 'w') as fp:
|
||||
json.dump(settings, fp, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user