mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +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:
parent
eb97bafeef
commit
84d7597d52
@ -6,9 +6,10 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
async def wipe_device(msg: WipeDevice) -> Success:
|
async def wipe_device(msg: WipeDevice) -> Success:
|
||||||
import storage
|
import storage
|
||||||
from trezor import TR, translations
|
from trezor import TR, config, translations
|
||||||
from trezor.enums import ButtonRequestType
|
from trezor.enums import ButtonRequestType
|
||||||
from trezor.messages import Success
|
from trezor.messages import Success
|
||||||
|
from trezor.pin import render_empty_loader
|
||||||
from trezor.ui.layouts import confirm_action
|
from trezor.ui.layouts import confirm_action
|
||||||
|
|
||||||
from apps.base import reload_settings_from_storage
|
from apps.base import reload_settings_from_storage
|
||||||
@ -25,6 +26,9 @@ async def wipe_device(msg: WipeDevice) -> Success:
|
|||||||
br_code=ButtonRequestType.WipeDevice,
|
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
|
# wipe storage
|
||||||
storage.wipe()
|
storage.wipe()
|
||||||
# erase translations
|
# erase translations
|
||||||
|
Loading…
Reference in New Issue
Block a user