Allow unlock without explicit password

This commit is contained in:
thePR0M3TH3AN
2025-07-18 12:38:09 -04:00
parent c1f195d74f
commit a83001a799

View File

@@ -276,7 +276,7 @@ class PasswordManager:
self.config_manager = None self.config_manager = None
self.locked = True self.locked = True
def unlock_vault(self, password: str) -> float: def unlock_vault(self, password: Optional[str] = None) -> float:
"""Unlock the vault using the provided ``password``. """Unlock the vault using the provided ``password``.
Parameters Parameters
@@ -292,6 +292,8 @@ class PasswordManager:
start = time.perf_counter() start = time.perf_counter()
if not self.fingerprint_dir: if not self.fingerprint_dir:
raise ValueError("Fingerprint directory not set") raise ValueError("Fingerprint directory not set")
if password is None:
password = prompt_existing_password(self.get_password_prompt())
self.setup_encryption_manager(self.fingerprint_dir, password) self.setup_encryption_manager(self.fingerprint_dir, password)
self.initialize_bip85() self.initialize_bip85()
self.initialize_managers() self.initialize_managers()