nostr-dev-kit / ndk

Nostr Development Kit with outbox-model support
https://nostr-dev-kit.github.io/ndk/
MIT License
366 stars 99 forks source link

Invalid byte sequence #217

Closed minimo-io closed 6 months ago

minimo-io commented 6 months ago

Any ideas on why this is? Thanks! Error: Invalid byte sequence at hexToBytes (utils.ts:59:47) at encodeBytes (index.js:1025:14) at Object.npubEncode (index.js:1015:10) at get npub (index.mjs:2897:27)

Screenshot 2024-04-27 at 15 34 32

pablof7z commented 6 months ago

That's from trying to use an invalid pubkey

minimo-io commented 6 months ago

That's from trying to use an invalid pubkey

But isn't that curious given that I am iterating a set of NDKUsers returned by the follows method ? 🤔 Shouldn't all be valid pubkeys? Thanks again Pablo!

pablof7z commented 6 months ago

Not at all, a lot of people have broken follow lists. Perhaps the follows function should skip those

minimo-io commented 6 months ago

Got it! I keep learning here 🫡 Thanks.