daemon: do not set CURRENT_WALLET if the -w option was passed
This was the previous behaviour with gui_last_wallet.
This commit is contained in:
@@ -486,6 +486,7 @@ class Daemon(Logger):
|
|||||||
coro = wallet.lnworker.lnwatcher.trigger_callbacks(requires_synchronizer=False)
|
coro = wallet.lnworker.lnwatcher.trigger_callbacks(requires_synchronizer=False)
|
||||||
asyncio.run_coroutine_threadsafe(coro, self.asyncio_loop)
|
asyncio.run_coroutine_threadsafe(coro, self.asyncio_loop)
|
||||||
self.add_wallet(wallet)
|
self.add_wallet(wallet)
|
||||||
|
if self.config.get('wallet_path') is None:
|
||||||
self.config.CURRENT_WALLET = path
|
self.config.CURRENT_WALLET = path
|
||||||
self.update_recently_opened_wallets(path)
|
self.update_recently_opened_wallets(path)
|
||||||
return wallet
|
return wallet
|
||||||
@@ -553,6 +554,7 @@ class Daemon(Logger):
|
|||||||
if not wallet:
|
if not wallet:
|
||||||
return False
|
return False
|
||||||
await wallet.stop()
|
await wallet.stop()
|
||||||
|
if self.config.get('wallet_path') is None:
|
||||||
wallet_paths = [w.db.storage.path for w in self._wallets.values()
|
wallet_paths = [w.db.storage.path for w in self._wallets.values()
|
||||||
if w.db.storage and w.db.storage.path]
|
if w.db.storage and w.db.storage.path]
|
||||||
if self.config.CURRENT_WALLET == path and wallet_paths:
|
if self.config.CURRENT_WALLET == path and wallet_paths:
|
||||||
|
|||||||
Reference in New Issue
Block a user