Verified Commit 505b2e91 authored by Jakob Moser's avatar Jakob Moser
Browse files

Only try unlocking if we need to

parent dc6b9614
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ if not vault.is_open:
    password = get_password()
else:
    print("🔓 The PoolPay database is already [green]unlocked[/green].")
    password = None

match args.action:
    case "ui":
@@ -42,5 +43,6 @@ match args.action:
            finally:
                db.close()
    case "unlock":
        if password is not None:
            with Client(socket_path) as c:
                c.send({"action": "unlock", "password": password})