mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-10 00:09:04 +00:00
feat: show seed fingerprint on each screen
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
@@ -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():
|
||||
|
Reference in New Issue
Block a user