diff --git a/bot/modules/nostr/lib.ts b/bot/modules/nostr/lib.ts index 9feed49c..44557c12 100644 --- a/bot/modules/nostr/lib.ts +++ b/bot/modules/nostr/lib.ts @@ -4,7 +4,9 @@ export const decodeNpub = (npub: string) => { try { const { type, data } = nip19.decode(npub); if (type === 'npub') return data; - } catch (err) {} + } catch (err) { + return null; + } }; export const encodeNpub = (hex: string) => { return nip19.npubEncode(hex);