From 3fe0594a82c3f259e627eb727336ba36f030c890 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 15 Nov 2023 16:09:06 +0100 Subject: [PATCH] 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. --- core/src/apps/management/wipe_device.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/apps/management/wipe_device.py b/core/src/apps/management/wipe_device.py index 652c6fd18..b6e60057a 100644 --- a/core/src/apps/management/wipe_device.py +++ b/core/src/apps/management/wipe_device.py @@ -6,9 +6,10 @@ if TYPE_CHECKING: async def wipe_device(msg: WipeDevice) -> Success: import storage - from trezor import TR, translations + from trezor import TR, config, translations from trezor.enums import ButtonRequestType from trezor.messages import Success + from trezor.pin import render_empty_loader from trezor.ui.layouts import confirm_action 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 + render_empty_loader(config.StorageMessage.PROCESSING_MSG) + # wipe storage storage.wipe() # erase translations