1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-08-05 05:15:27 +00:00

feat(core): show progress before starting to wipe device

This doesn't actually advance the progress while device erase is ongoing, but at least the user sees a loader.
This commit is contained in:
matejcik 2023-11-15 16:09:06 +01:00
parent 3443ffad1a
commit 3388772aa1

View File

@ -10,6 +10,7 @@ async def wipe_device(msg: WipeDevice) -> Success:
from trezor.enums import ButtonRequestType
from trezor.messages import Success
from trezor.ui.layouts import confirm_action
from trezor.ui.layouts.progress import progress
from apps.base import reload_settings_from_storage
@ -25,6 +26,9 @@ async def wipe_device(msg: WipeDevice) -> Success:
br_code=ButtonRequestType.WipeDevice,
)
# start an empty progress screen so that the screen is not blank while waiting
progress(TR.progress__processing).start()
# wipe storage
storage.wipe()
# erase translations