diff options
| author | Adrien Hopkins <[email protected]> | 2025-09-05 16:51:32 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2025-09-05 16:51:32 -0500 |
| commit | 4a2af45b77bb36a81b7f29908b3b320ddb76a769 (patch) | |
| tree | d0e953075d66c09a561b6b5bb84f41cd049d7e95 /src/routes | |
| parent | 3d939751f3cdf0684d1de1c7817f7facdb496769 (diff) | |
| download | coinos-ui-4a2af45b77bb36a81b7f29908b3b320ddb76a769.tar.gz coinos-ui-4a2af45b77bb36a81b7f29908b3b320ddb76a769.zip | |
Seal with NIP-07 if available
This makes the system work with any nostr extensions you might be using.
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/dm/[recipient]/+page.svelte | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/routes/(app)/dm/[recipient]/+page.svelte b/src/routes/(app)/dm/[recipient]/+page.svelte index 9e13ab19..33edfcc6 100644 --- a/src/routes/(app)/dm/[recipient]/+page.svelte +++ b/src/routes/(app)/dm/[recipient]/+page.svelte @@ -8,8 +8,6 @@ let { data } = $props(); const { user, recipient } = data; - // console.log(sign({kind: 13, created_at: 0, tags: [], pubkey: recipient.pubkey, content: "Test"}, recipient)); - let senderSK = $state(""); let overridePK = $state(""); let text = $state(""); @@ -23,11 +21,15 @@ const recipientPK = overridePK || recipient.pubkey; const skBytes = hexToBytes(senderSK); const event = createNIP17Message(text, skBytes, recipientPK); - console.log(JSON.stringify(event)); + event.then(displayEvent); } catch (error) { console.log(error); } } + + const displayEvent = (event: object) => { + console.log(JSON.stringify(event)); + } </script> <div class="container"> |
