Skip to content

Commit

Permalink
Some menu items reverted to return status None
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Do committed Jul 16, 2024
1 parent 20de2f0 commit 03e2807
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
16 changes: 6 additions & 10 deletions src/krux/pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def load_method(self):
t("Load from SD card"),
None if not self.has_sd_card() else lambda: None,
),
("< " + t("Back"), lambda: MENU_EXIT),
("< " + t("Back"), lambda: None),
],
)
index, _ = load_menu.run_loop()
Expand Down Expand Up @@ -902,15 +902,11 @@ def choose_len_mnemonic(ctx):
submenu = Menu(
ctx,
[
(t("12 words"), lambda: MENU_EXIT),
(t("24 words"), lambda: MENU_EXIT),
("< " + t("Back"), lambda: MENU_EXIT),
(t("12 words"), lambda: 12),
(t("24 words"), lambda: 24),
("< " + t("Back"), lambda: None),
],
)
index, _ = submenu.run_loop()
_, num_words = submenu.run_loop()
ctx.display.clear()
if index == 0:
return 12
if index == 1:
return 24
return None
return num_words
2 changes: 1 addition & 1 deletion src/krux/pages/home_pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _sign_menu(self):
t("Sign to SD card"),
None if not self.has_sd_card() else lambda: None,
),
("< " + t("Back"), lambda: MENU_EXIT),
("< " + t("Back"), lambda: None),
],
)
index, _ = sign_menu.run_loop()
Expand Down
4 changes: 2 additions & 2 deletions src/krux/pages/home_pages/sign_message_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from embit import bip32, compact
import hashlib
import binascii
from .. import MENU_CONTINUE, MENU_EXIT, LOAD_FROM_CAMERA, LOAD_FROM_SD, Menu
from .. import MENU_CONTINUE, LOAD_FROM_CAMERA, LOAD_FROM_SD, Menu
from ...themes import theme
from ...display import (
DEFAULT_PADDING,
Expand Down Expand Up @@ -199,7 +199,7 @@ def sign_message(self):
t("Sign to SD card"),
None if not self.has_sd_card() else lambda: None,
),
("< " + t("Back"), lambda: MENU_EXIT),
("< " + t("Back"), lambda: None),
],
)
index, _ = sign_menu.run_loop()
Expand Down

0 comments on commit 03e2807

Please sign in to comment.