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,7 +486,8 @@ 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)
|
||||||
self.config.CURRENT_WALLET = path
|
if self.config.get('wallet_path') is None:
|
||||||
|
self.config.CURRENT_WALLET = path
|
||||||
self.update_recently_opened_wallets(path)
|
self.update_recently_opened_wallets(path)
|
||||||
return wallet
|
return wallet
|
||||||
|
|
||||||
@@ -553,10 +554,11 @@ class Daemon(Logger):
|
|||||||
if not wallet:
|
if not wallet:
|
||||||
return False
|
return False
|
||||||
await wallet.stop()
|
await wallet.stop()
|
||||||
wallet_paths = [w.db.storage.path for w in self._wallets.values()
|
if self.config.get('wallet_path') is None:
|
||||||
if w.db.storage and w.db.storage.path]
|
wallet_paths = [w.db.storage.path for w in self._wallets.values()
|
||||||
if self.config.CURRENT_WALLET == path and wallet_paths:
|
if w.db.storage and w.db.storage.path]
|
||||||
self.config.CURRENT_WALLET = wallet_paths[0]
|
if self.config.CURRENT_WALLET == path and wallet_paths:
|
||||||
|
self.config.CURRENT_WALLET = wallet_paths[0]
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run_daemon(self):
|
def run_daemon(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user