From 2949cc22c97cd94cc34c316262f098872a41cfe8 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 5 Aug 2025 14:53:39 -0400 Subject: [PATCH] Fix inconsistent Nostr sync notifications --- src/seedpass/core/encryption.py | 1 - src/seedpass/core/manager.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seedpass/core/encryption.py b/src/seedpass/core/encryption.py index 93ba557..e90ac11 100644 --- a/src/seedpass/core/encryption.py +++ b/src/seedpass/core/encryption.py @@ -399,7 +399,6 @@ class EncryptionManager: self.save_json_data(data, relative_path) # This always saves in V2 format self.update_checksum(relative_path) logger.info("Index file from Nostr was processed and saved successfully.") - print(colored("Index file updated from Nostr successfully.", "green")) self.last_migration_performed = is_legacy return True except InvalidToken as e: diff --git a/src/seedpass/core/manager.py b/src/seedpass/core/manager.py index b3ba8d2..2c7a45d 100644 --- a/src/seedpass/core/manager.py +++ b/src/seedpass/core/manager.py @@ -1380,6 +1380,7 @@ class PasswordManager: ) if updated: logger.info("Local database synchronized from Nostr.") + self.notify("Index file updated from Nostr successfully.") except Exception as e: logger.warning( "Unable to sync index from Nostr relays %s: %s", @@ -1540,6 +1541,7 @@ class PasswordManager: if migrated and not getattr(self, "offline_mode", False): self.start_background_vault_sync() logger.info("Initialized local database from Nostr.") + self.notify("Index file updated from Nostr successfully.") except Exception as e: # pragma: no cover - network errors logger.warning(f"Unable to sync index from Nostr: {e}") finally: @@ -4154,7 +4156,6 @@ class PasswordManager: try: self.vault.decrypt_and_save_index_from_nostr(encrypted_data, merge=True) logging.info("Index file updated from Nostr successfully.") - print(colored("Index file updated from Nostr successfully.", "green")) except Exception as e: logging.error( f"Failed to decrypt and save data from Nostr: {e}", exc_info=True