BitBoxSwiss / bitbox02-firmware

Firmware code of the BitBox02 hardware wallet
https://bitbox.swiss/bitbox02
Apache License 2.0
217 stars 81 forks source link

restore/mnemonic: fix cancel dialog #1015

Closed benma closed 1 year ago

benma commented 1 year ago

d9029fff23ceb490f412f5d800840810d4336493 introduced a regression - it added the 'Do you really want to cancel?' dialog to all trinary input dialogs. The purpose was that the user could cancel the password entry when setting a password. The cancel dialog was accidentally introduced also when cancelling the 'restore from mnemonic' workflow, which had its own more complex cancellation logic where the user can choose to edit the previous word instead. This was accidentally buried behind the 'Do you really want to cancel' dialog.

This commit fixes it by only asking the user if they want to cancel when entering a password only, not for all trinary inputs.