respect blockchain_name in daemon settings when creating initial wallet

This commit is contained in:
Lex Berezhny 2018-10-12 12:28:39 -04:00
parent 8a6e6b4d77
commit 357763ff61

View file

@ -186,13 +186,12 @@ class LbryWalletManager(BaseWalletManager):
'ledgers': {ledger_id: ledger_config},
'wallets': [wallet_file_path]
})
ledger = manager.get_or_create_ledger(ledger_id)
if manager.default_account is None:
ledger = manager.get_or_create_ledger('lbc_mainnet')
log.info('Wallet at %s is empty, generating a default account.', wallet_file_path)
manager.default_wallet.generate_account(ledger)
manager.default_wallet.save()
if receiving_addresses or change_addresses:
ledger = manager.get_or_create_ledger(ledger_id)
if not os.path.exists(ledger.path):
os.mkdir(ledger.path)
yield ledger.db.open()