From 7d84ff1e72f0cdc19e78b4b76d9123bb0aea866b Mon Sep 17 00:00:00 2001
From: M1nd3r <petrsedlacek.km@seznam.cz>
Date: Thu, 19 Dec 2024 18:06:15 +0100
Subject: [PATCH] WIP: try simplify message handler, might break something [no
 changelog]

---
 core/src/trezor/wire/message_handler.py | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/core/src/trezor/wire/message_handler.py b/core/src/trezor/wire/message_handler.py
index c0f201de22..1fa038db67 100644
--- a/core/src/trezor/wire/message_handler.py
+++ b/core/src/trezor/wire/message_handler.py
@@ -126,14 +126,7 @@ async def handle_single_message(ctx: Context, msg: Message) -> bool:
         # Find a protobuf.MessageType subclass that describes this
         # message.  Raises if the type is not found.
 
-        if utils.USE_THP:
-            name = get_msg_name(msg.type)
-            if name is None:
-                req_type = protobuf.type_for_wire(msg.type)
-            else:
-                req_type = protobuf.type_for_name(name)
-        else:
-            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
         # `req_type`. Raises if the message is malformed.