coins: Encrypt wallets before importing seeds, allow BTC to start without wallet.

Create BTC wallet on unlock if missing.
This commit is contained in:
tecnovert
2022-12-13 00:12:28 +02:00
parent 3f71dffe5a
commit ef6653a8db
5 changed files with 42 additions and 16 deletions

View File

@@ -655,7 +655,12 @@ class BasicSwap(BaseApp):
self.createCoinInterface(c)
if self.coin_clients[c]['connection_type'] == 'rpc':
self.waitForDaemonRPC(c)
if c == Coins.BTC:
self.waitForDaemonRPC(c, with_wallet=False)
if len(self.callcoinrpc(c, 'listwallets')) >= 1:
self.waitForDaemonRPC(c)
else:
self.waitForDaemonRPC(c)
ci = self.ci(c)
core_version = ci.getDaemonVersion()
self.log.info('%s Core version %d', ci.coin_name(), core_version)
@@ -1655,6 +1660,9 @@ class BasicSwap(BaseApp):
if expect_seedid is None:
self.log.warning('Can\'t find expected wallet seed id for coin {}'.format(ci.coin_name()))
return False
if len(ci.rpc_callback('listwallets')) < 1:
self.log.warning('Missing wallet for coin {}'.format(ci.coin_name()))
return False
if ci.checkExpectedSeed(expect_seedid):
ci.setWalletSeedWarning(False)
return True