From 61515243939098f2326536df965806c749f7ad9f Mon Sep 17 00:00:00 2001 From: obrusvit Date: Wed, 11 Dec 2024 16:26:27 +0100 Subject: [PATCH] feat(contacts): new contact UI using nostr event --- core/src/apps/nostr/sign_event.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/src/apps/nostr/sign_event.py b/core/src/apps/nostr/sign_event.py index 4718526f1d..55e0909a9d 100644 --- a/core/src/apps/nostr/sign_event.py +++ b/core/src/apps/nostr/sign_event.py @@ -15,6 +15,7 @@ async def sign_event(msg: NostrSignEvent, keychain: Keychain) -> NostrEventSigna from trezor.crypto.curve import secp256k1 from trezor.crypto.hashlib import sha256 from trezor.messages import NostrEventSignature + from trezor.ui.layouts import confirm_action, confirm_new_contact address_n = msg.address_n created_at = msg.created_at @@ -22,6 +23,22 @@ async def sign_event(msg: NostrSignEvent, keychain: Keychain) -> NostrEventSigna tags = msg.tags content = msg.content + if content and kind == 27922: + if "/" not in content: + raise ValueError("Invalid content") + # message will have format