1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-28 07:12:28 +00:00

chore(core/nostr): remove Nostr from production build

[no changelog]
This commit is contained in:
Ioan Bizău 2024-12-18 15:31:34 +01:00
parent 4350b0d31d
commit 31f2eb06dc
4 changed files with 22 additions and 11 deletions

View File

@ -662,9 +662,10 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*.py')) if PYOPT == '0':
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Nostr*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Nostr*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py'))

View File

@ -721,9 +721,10 @@ if FROZEN:
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nem/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/NEM*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*.py')) if PYOPT == '0':
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Nostr*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Nostr*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/ripple/*.py'))
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py')) SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py'))

View File

@ -1,3 +1,8 @@
if not __debug__:
from trezor import utils
utils.halt("Disabled in production mode")
from apps.common.paths import PATTERN_BIP44 from apps.common.paths import PATTERN_BIP44
CURVE = "secp256k1" CURVE = "secp256k1"

View File

@ -106,11 +106,15 @@ def _find_message_handler_module(msg_type: int) -> str:
if msg_type == MessageType.GetFirmwareHash: if msg_type == MessageType.GetFirmwareHash:
return "apps.misc.get_firmware_hash" return "apps.misc.get_firmware_hash"
# nostr # When promoting the Nostr app to production-level
if msg_type == MessageType.NostrGetPubkey: # and removing the "if" guard don't forget to also remove
return "apps.nostr.get_pubkey" # the corresponding guards (PYOPT == '0') in Sconscript.*
if msg_type == MessageType.NostrSignEvent: if __debug__:
return "apps.nostr.sign_event" # 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: if not utils.BITCOIN_ONLY:
if msg_type == MessageType.SetU2FCounter: if msg_type == MessageType.SetU2FCounter: