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:
parent
4350b0d31d
commit
31f2eb06dc
@ -662,9 +662,10 @@ if FROZEN:
|
||||
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 + 'apps/nostr/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/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/ripple/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py'))
|
||||
|
@ -721,9 +721,10 @@ if FROZEN:
|
||||
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 + 'apps/nostr/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'apps/nostr/*/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/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/ripple/*.py'))
|
||||
SOURCE_PY.extend(Glob(SOURCE_PY_DIR + 'trezor/enums/Ripple*.py'))
|
||||
|
@ -1,3 +1,8 @@
|
||||
if not __debug__:
|
||||
from trezor import utils
|
||||
|
||||
utils.halt("Disabled in production mode")
|
||||
|
||||
from apps.common.paths import PATTERN_BIP44
|
||||
|
||||
CURVE = "secp256k1"
|
||||
|
@ -106,11 +106,15 @@ def _find_message_handler_module(msg_type: int) -> str:
|
||||
if msg_type == MessageType.GetFirmwareHash:
|
||||
return "apps.misc.get_firmware_hash"
|
||||
|
||||
# nostr
|
||||
if msg_type == MessageType.NostrGetPubkey:
|
||||
return "apps.nostr.get_pubkey"
|
||||
if msg_type == MessageType.NostrSignEvent:
|
||||
return "apps.nostr.sign_event"
|
||||
# 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:
|
||||
if msg_type == MessageType.SetU2FCounter:
|
||||
|
Loading…
Reference in New Issue
Block a user