1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

src/apps/debug: don't erase storage on debug in emulator

This commit is contained in:
Pavol Rusnak 2018-10-10 16:07:57 +02:00
parent 9ddb1b9280
commit cc25069064
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -4,7 +4,7 @@ if not __debug__:
halt("debug mode inactive")
if __debug__:
from trezor import loop
from trezor import loop, utils
from trezor.messages import MessageType
from trezor.messages.DebugLinkState import DebugLinkState
from trezor.ui import confirm, swipe
@ -38,8 +38,9 @@ if __debug__:
return m
def boot():
# wipe storage when debug build is used
storage.wipe()
# wipe storage when debug build is used on real hardware
if not utils.EMULATOR:
storage.wipe()
register(
MessageType.DebugLinkDecision, protobuf_workflow, dispatch_DebugLinkDecision