reintroduce 'unlock' command
- the unlock command was replaced by an option to load_wallet, because some applications (the swapserver plugin) need to be executed with an unlocked password. Now the swapserver plugin waits until the wallet is unlocked. - wallet.unlock now checks password unconditionally, see #8799
This commit is contained in:
@@ -38,6 +38,11 @@ class SwapServer(Logger, EventListener):
|
||||
@ignore_exceptions
|
||||
@log_exceptions
|
||||
async def run(self):
|
||||
|
||||
while self.wallet.has_password() and self.wallet.get_unlocked_password() is None:
|
||||
self.logger.info("This wallet is password-protected. Please unlock it to start the swapserver plugin")
|
||||
await asyncio.sleep(10)
|
||||
|
||||
app = web.Application()
|
||||
app.add_routes([web.get('/getpairs', self.get_pairs)])
|
||||
app.add_routes([web.post('/createswap', self.create_swap)])
|
||||
|
||||
Reference in New Issue
Block a user