diff options
| author | Adrien Hopkins <[email protected]> | 2025-10-01 11:13:09 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2025-10-01 11:13:09 -0500 |
| commit | 2f2348f459e3b6683284975e63df356e8c821bdc (patch) | |
| tree | 116ac01326052ff5ee5e375f2e93ff8f6ec66c25 /src/lib | |
| parent | 48d2cac1abf64d549cf10c18c90b875a086c575f (diff) | |
| download | coinos-ui-2f2348f459e3b6683284975e63df356e8c821bdc.tar.gz coinos-ui-2f2348f459e3b6683284975e63df356e8c821bdc.zip | |
Fetch & display received DMs from relays
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/nip17.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/nip17.ts b/src/lib/nip17.ts index 84790275..495f897e 100644 --- a/src/lib/nip17.ts +++ b/src/lib/nip17.ts @@ -79,13 +79,11 @@ const giftWrap = (event: object, receiverPK: string) => { return finalizeEvent(giftWrapEvent, secretKey); } -export const decryptNIP17MessageNIP07 = async (text: string): string => { - const wrapped = JSON.parse(text); +export const decryptNIP17MessageNIP07 = async (wrapped: object): object => { const sealedText = await window.nostr.nip44.decrypt( wrapped.pubkey, wrapped.content); const sealed = JSON.parse(sealedText); const rumourText = await window.nostr.nip44.decrypt( sealed.pubkey, sealed.content); - const rumour = JSON.parse(rumourText); - return rumour.content; + return JSON.parse(rumourText); } |
