Skip to content

Conversation

benma
Copy link
Collaborator

@benma benma commented Oct 2, 2025

show_and_confirm_mnemonic(hal: ...) did not use the HAL for all UI: show_mnemonic and confirm_mnemonic directly used the BitBox02 menu workflow without going through HAL. Can't use hal().ui().menu(...), becaus:

  • these functions bolt a cancel prompt on top
  • show_mnemonic is not a normal menu where one can pick an entry, it's just a scroll-through for displaying the mnemonic

This should make it possible to mock/fake/test the mnemonic workflow functions, and provide different implementations for them in future BitBox hardware.

@benma benma requested a review from NickeZ October 2, 2025 09:57
`show_and_confirm_mnemonic(hal: ...)` did not use the HAL for all UI:
show_mnemonic and confirm_mnemonic directly used the BitBox02 menu
workflow without going through HAL. Can't use `hal().ui().menu(...)`,
becaus:

- these functions bolt a cancel prompt on top
- show_mnemonic is not a normal menu where one can pick an entry, it's
  just a scroll-through for displaying the mnemonic

This should make it possible to mock/fake/test the mneomnic workflow
functions, and provide different implementations for them in future
BitBox hardware.
Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@benma benma merged commit e74e3b8 into BitBoxSwiss:master Oct 4, 2025
32 checks passed
@benma benma deleted the fold-cancel branch October 4, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants