1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

core: move load_device to the debug app

This commit is contained in:
matejcik 2019-11-12 17:42:24 +01:00 committed by matejcik
parent fd8aed6105
commit 09962708d3
3 changed files with 5 additions and 8 deletions

View File

@ -4,14 +4,12 @@ if not __debug__:
halt("debug mode inactive")
if __debug__:
from trezor import config, io, log, loop, ui, utils
from trezor import config, io, log, loop, ui, utils, wire
from trezor.messages import MessageType, DebugSwipeDirection
from trezor.messages.DebugLinkLayout import DebugLinkLayout
from trezor.wire import register
if False:
from typing import List, Optional
from trezor import wire
from trezor.messages.DebugLinkDecision import DebugLinkDecision
from trezor.messages.DebugLinkGetState import DebugLinkGetState
from trezor.messages.DebugLinkState import DebugLinkState
@ -111,5 +109,7 @@ if __debug__:
if not utils.EMULATOR:
config.wipe()
register(MessageType.DebugLinkDecision, dispatch_DebugLinkDecision)
register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState)
wire.register(MessageType.DebugLinkDecision, dispatch_DebugLinkDecision)
wire.register(MessageType.DebugLinkGetState, dispatch_DebugLinkGetState)
wire.add(MessageType.LoadDevice, __name__, "load_device")

View File

@ -3,9 +3,6 @@ from trezor.messages import MessageType
def boot() -> None:
# only enable LoadDevice in debug builds
if __debug__:
wire.add(MessageType.LoadDevice, __name__, "load_device")
wire.add(MessageType.ResetDevice, __name__, "reset_device")
wire.add(MessageType.BackupDevice, __name__, "backup_device")
wire.add(MessageType.WipeDevice, __name__, "wipe_device")