mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-08 15:48:08 +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:
parent
1822aebdb4
commit
b387970468
@ -205,10 +205,6 @@ if __debug__:
|
|||||||
return Success()
|
return Success()
|
||||||
|
|
||||||
def boot() -> None:
|
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.DebugLinkDecision, dispatch_DebugLinkDecision) # type: ignore
|
||||||
workflow_handlers.register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState) # type: ignore
|
workflow_handlers.register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState) # type: ignore
|
||||||
workflow_handlers.register(
|
workflow_handlers.register(
|
||||||
|
@ -33,5 +33,9 @@ async def bootscreen() -> None:
|
|||||||
ui.display.backlight(ui.BACKLIGHT_NONE)
|
ui.display.backlight(ui.BACKLIGHT_NONE)
|
||||||
ui.backlight_fade(ui.BACKLIGHT_NORMAL)
|
ui.backlight_fade(ui.BACKLIGHT_NORMAL)
|
||||||
config.init(show_pin_timeout)
|
config.init(show_pin_timeout)
|
||||||
|
|
||||||
|
if __debug__ and not utils.EMULATOR:
|
||||||
|
config.wipe()
|
||||||
|
|
||||||
loop.schedule(bootscreen())
|
loop.schedule(bootscreen())
|
||||||
loop.run()
|
loop.run()
|
||||||
|
Loading…
Reference in New Issue
Block a user