Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/seedsigner/views/seed_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def run(self):
return Destination(SeedBackupView, view_args=dict(seed_num=self.seed_num))

elif button_data[selected_menu_num] == self.BIP85_CHILD_SEED:
return Destination(SeedBIP85ApplicationModeView, view_args={"seed_num": self.seed_num})
return Destination(SeedBIP85SelectNumWordsView, view_args={"seed_num": self.seed_num})

elif button_data[selected_menu_num] == self.DISCARD:
return Destination(SeedDiscardView, view_args=dict(seed_num=self.seed_num))
Expand Down Expand Up @@ -1120,25 +1120,16 @@ def run(self):


"""****************************************************************************
BIP-85 - Derive child mnemonic (seed) flow
BIP-85 - Derive child mnemonic (seed) flow (Application number 39')
****************************************************************************"""
class SeedBIP85ApplicationModeView(View):
"""
* Ask the user the application type as defined in the BIP-85 spec.
* Currently only Word mode of 12, 24 words (Application number: 39')
* Possible future additions are
* WIF (HDSEED)
* XPRV (BIP-32)
"""
# TODO: Future enhancement to display WIF (HD-SEED) and XPRV (BIP-32)?
class SeedBIP85SelectNumWordsView(View):
WORDS_12 = ButtonOption("12 Words")
WORDS_24 = ButtonOption("24 Words")

def __init__(self, seed_num: int):
super().__init__()
self.seed_num = seed_num
self.num_words = 0
self.bip85_app_num = 39 # TODO: Support other Application numbers; TODO: Define this as a constant


def run(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/screenshot_generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def PSBTOpReturnView_raw_hex_data_cb_before():
ScreenshotConfig(seed_views.SeedWordsWarningView, dict(seed_num=0)),
ScreenshotConfig(seed_views.SeedWordsView, dict(seed_num=0)),
ScreenshotConfig(seed_views.SeedWordsView, dict(seed_num=0, page_index=2), screenshot_name="SeedWordsView_2"),
ScreenshotConfig(seed_views.SeedBIP85ApplicationModeView, dict(seed_num=0)),
ScreenshotConfig(seed_views.SeedBIP85SelectNumWordsView, dict(seed_num=0)),
ScreenshotConfig(seed_views.SeedBIP85SelectChildIndexView, dict(seed_num=0, num_words=24)),
ScreenshotConfig(seed_views.SeedBIP85InvalidChildIndexView, dict(seed_num=0, num_words=12)),
ScreenshotConfig(seed_views.SeedWordsBackupTestPromptView, dict(seed_num=0)),
Expand Down