1
0

Merge pull request #9959 from accumulator/nostr_swap_server_wait_unlock

submarine_swaps: wait for unlock if wallet is password protected before starting nostr swap service
This commit is contained in:
accumulator
2025-06-16 16:14:36 +02:00
committed by GitHub

View File

@@ -245,6 +245,11 @@ class SwapManager(Logger):
@log_exceptions
async def run_nostr_server(self):
await self.set_nostr_proof_of_work()
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)
with NostrTransport(self.config, self, self.lnworker.nostr_keypair) as transport:
await transport.is_connected.wait()
self.logger.info(f'nostr is connected')