feat: show seed fingerprint on each screen

This commit is contained in:
thePR0M3TH3AN
2025-07-06 08:10:12 -04:00
parent 34a7775fec
commit 512a92a65b
4 changed files with 60 additions and 27 deletions

View File

@@ -28,7 +28,7 @@ try:
from .input_utils import timed_input
from .memory_protection import InMemorySecret
from .clipboard import copy_to_clipboard
from .terminal_utils import clear_screen, pause
from .terminal_utils import clear_screen, pause, clear_and_print_fingerprint
if logger.isEnabledFor(logging.DEBUG):
logger.info("Modules imported successfully.")
@@ -57,5 +57,6 @@ __all__ = [
"InMemorySecret",
"copy_to_clipboard",
"clear_screen",
"clear_and_print_fingerprint",
"pause",
]

View File

@@ -3,11 +3,21 @@
import sys
from termcolor import colored
def clear_screen() -> None:
"""Clear the terminal screen using an ANSI escape code."""
print("\033c", end="")
def clear_and_print_fingerprint(fingerprint: str | None) -> None:
"""Clear the screen and optionally display the current fingerprint."""
clear_screen()
if fingerprint:
print(colored(f"Seed Profile: {fingerprint}", "green"))
def pause(message: str = "Press Enter to continue...") -> None:
"""Wait for the user to press Enter before proceeding."""
if not sys.stdin or not sys.stdin.isatty():