From 3ccd73b8e69332e137a71d171d0cbe183b56a0da Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Tue, 14 Jan 2025 10:41:53 +0100 Subject: [PATCH] remove unnecessary validate_func arg from ux_input_numbers (Mk4) (cherry picked from commit 14ce2ca6e09a83d18ebda8befb23d0adfc8eaa69) --- shared/seed.py | 2 +- shared/ux_mk4.py | 3 +-- shared/ux_q1.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/shared/seed.py b/shared/seed.py index ec82a81e..f73651cf 100644 --- a/shared/seed.py +++ b/shared/seed.py @@ -1209,7 +1209,7 @@ class PassphraseMenu(MenuSystem): @classmethod async def add_numbers(cls, *a): # Mk4 only: add some digits (quick, easy) - pw = await ux_input_numbers(cls.pp_sofar, cls.check_length) + pw = await ux_input_numbers(cls.pp_sofar) if pw is not None: cls.pp_sofar = pw cls.check_length() diff --git a/shared/ux_mk4.py b/shared/ux_mk4.py index dac8bf51..5ebcd2ea 100644 --- a/shared/ux_mk4.py +++ b/shared/ux_mk4.py @@ -122,7 +122,7 @@ async def ux_enter_number(prompt, max_value, can_cancel=False): # cleanup leading zeros and such value = str(min(int(value), max_value)) -async def ux_input_numbers(val, validate_func): +async def ux_input_numbers(val): # collect a series of digits from glob import dis from display import FontTiny @@ -161,7 +161,6 @@ async def ux_input_numbers(val, validate_func): ch = await press.wait() if ch == 'y': val += here - validate_func() return val elif ch == 'x': if here: diff --git a/shared/ux_q1.py b/shared/ux_q1.py index e8a32e3f..bdc34414 100644 --- a/shared/ux_q1.py +++ b/shared/ux_q1.py @@ -138,7 +138,7 @@ async def ux_enter_number(prompt, max_value, can_cancel=False): # cleanup leading zeros and such value = str(min(int(value), max_value)) -async def ux_input_numbers(val, validate_func): +async def ux_input_numbers(val): # collect a series of digits # - not wanted on Q1; just get the digits mixed in w/ the text. pass