From aecaf306f33d3b3262949bc4a29f94d8bed60d99 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 27 Mar 2025 11:44:29 +0200 Subject: [PATCH] fix(core): don't handle nostr-related messages in BTC-only firmware [no changelog] --- core/src/apps/workflow_handlers.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/apps/workflow_handlers.py b/core/src/apps/workflow_handlers.py index c7ff7ba477..4f633e6156 100644 --- a/core/src/apps/workflow_handlers.py +++ b/core/src/apps/workflow_handlers.py @@ -106,17 +106,17 @@ def _find_message_handler_module(msg_type: int) -> str: if msg_type == MessageType.GetFirmwareHash: return "apps.misc.get_firmware_hash" - # When promoting the Nostr app to production-level - # and removing the "if" guard don't forget to also remove - # the corresponding guards (PYOPT == '0') in Sconscript.* - if __debug__: - # nostr - if msg_type == MessageType.NostrGetPubkey: - return "apps.nostr.get_pubkey" - if msg_type == MessageType.NostrSignEvent: - return "apps.nostr.sign_event" - if not utils.BITCOIN_ONLY: + # When promoting the Nostr app to production-level + # and removing the "if" guard don't forget to also remove + # the corresponding guards (PYOPT == '0') in Sconscript.* + if __debug__: + # nostr + if msg_type == MessageType.NostrGetPubkey: + return "apps.nostr.get_pubkey" + if msg_type == MessageType.NostrSignEvent: + return "apps.nostr.sign_event" + if msg_type == MessageType.SetU2FCounter: return "apps.management.set_u2f_counter" if msg_type == MessageType.GetNextU2FCounter: