1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-25 04:25:42 +00:00

refactor(core/debug): move "wipe with debug build" to boot.py

otherwise it gets wiped after every workflow
This commit is contained in:
matejcik 2021-03-22 15:30:36 +01:00 committed by matejcik
parent 1822aebdb4
commit b387970468
2 changed files with 4 additions and 4 deletions

View File

@ -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(

View File

@ -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()