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:
parent
fd8aed6105
commit
09962708d3
@ -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")
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user