From cc25069064b87156ac36f29d2fc5a6592b9f24bc Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 10 Oct 2018 16:07:57 +0200 Subject: [PATCH] src/apps/debug: don't erase storage on debug in emulator --- src/apps/debug/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/debug/__init__.py b/src/apps/debug/__init__.py index 90158ccbd..ea47f5367 100644 --- a/src/apps/debug/__init__.py +++ b/src/apps/debug/__init__.py @@ -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