From b38797046833fb00c8fc4a713ed5212a93e9cdd7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 22 Mar 2021 15:30:36 +0100 Subject: [PATCH] refactor(core/debug): move "wipe with debug build" to boot.py otherwise it gets wiped after every workflow --- core/src/apps/debug/__init__.py | 4 ---- core/src/boot.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/apps/debug/__init__.py b/core/src/apps/debug/__init__.py index 03213ee2b..c8f8f33de 100644 --- a/core/src/apps/debug/__init__.py +++ b/core/src/apps/debug/__init__.py @@ -205,10 +205,6 @@ if __debug__: return Success() def boot() -> None: - # wipe storage when debug build is used on real hardware - if not utils.EMULATOR: - config.wipe() - workflow_handlers.register(MessageType.DebugLinkDecision, dispatch_DebugLinkDecision) # type: ignore workflow_handlers.register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState) # type: ignore workflow_handlers.register( diff --git a/core/src/boot.py b/core/src/boot.py index 9ba0fd3a8..cd1f31ae3 100644 --- a/core/src/boot.py +++ b/core/src/boot.py @@ -33,5 +33,9 @@ async def bootscreen() -> None: ui.display.backlight(ui.BACKLIGHT_NONE) ui.backlight_fade(ui.BACKLIGHT_NORMAL) config.init(show_pin_timeout) + +if __debug__ and not utils.EMULATOR: + config.wipe() + loop.schedule(bootscreen()) loop.run()