1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-04 20:01:18 +00:00

chore: remove unnecessary changes

[no changelog]
This commit is contained in:
M1nd3r 2025-01-31 16:08:22 +01:00
parent 9b6890f6a3
commit 3a366482e5
2 changed files with 3 additions and 8 deletions

View File

@ -215,12 +215,12 @@ if __debug__:
x = msg.x # local_cache_attribute x = msg.x # local_cache_attribute
y = msg.y # local_cache_attribute y = msg.y # local_cache_attribute
await wait_until_layout_is_running() await wait_until_layout_is_running()
assert isinstance(ui.CURRENT_LAYOUT, ui.Layout) assert isinstance(ui.CURRENT_LAYOUT, ui.Layout)
layout_change_box.clear() layout_change_box.clear()
try: try:
# click on specific coordinates, with possible hold # click on specific coordinates, with possible hold
if x is not None and y is not None: if x is not None and y is not None:
await _layout_click(x, y, msg.hold_ms or 0) await _layout_click(x, y, msg.hold_ms or 0)
@ -232,11 +232,7 @@ if __debug__:
elif msg.button is not None: elif msg.button is not None:
await _layout_event(msg.button) await _layout_event(msg.button)
elif msg.input is not None: elif msg.input is not None:
try: ui.CURRENT_LAYOUT._emit_message(msg.input)
ui.CURRENT_LAYOUT._emit_message(msg.input)
except Exception as e:
print(type(e))
else: else:
raise RuntimeError("Invalid DebugLinkDecision message") raise RuntimeError("Invalid DebugLinkDecision message")
@ -311,9 +307,9 @@ if __debug__:
async def dispatch_DebugLinkGetState( async def dispatch_DebugLinkGetState(
msg: DebugLinkGetState, msg: DebugLinkGetState,
) -> DebugLinkState | None: ) -> DebugLinkState | None:
if msg.wait_layout == DebugWaitType.IMMEDIATE: if msg.wait_layout == DebugWaitType.IMMEDIATE:
return _state() return _state()
assert DEBUG_CONTEXT is not None assert DEBUG_CONTEXT is not None
if msg.wait_layout == DebugWaitType.NEXT_LAYOUT: if msg.wait_layout == DebugWaitType.NEXT_LAYOUT:
layout_change_box.clear() layout_change_box.clear()

View File

@ -125,7 +125,6 @@ async def handle_single_message(ctx: Context, msg: Message) -> bool:
try: try:
# Find a protobuf.MessageType subclass that describes this # Find a protobuf.MessageType subclass that describes this
# message. Raises if the type is not found. # message. Raises if the type is not found.
req_type = protobuf.type_for_wire(msg.type) req_type = protobuf.type_for_wire(msg.type)
# Try to decode the message according to schema from # Try to decode the message according to schema from