npubs should be validated #308

Open
opened 2025-01-30 11:39:20 +00:00 by b · 1 comment
Owner

If the counterparty string starts with npub1 then we should validate the npub

We had a situation today where a user was unable to add a counterparty, and did not realise his npub was invalid. Nosta Me manages this ok:

https://nosta.me/npub1qnkhmdy37hltzfslu6m3vfylymhwyumgjmasnrc0qqq2kfnrqrxlsxr6ny8

ALSO - we had an issue with an npub not working because it had a leading space

both leading and trailing blanks should be automatically removed (but keep the ability to type them, eg "Tom Jones")

If the counterparty string starts with `npub1` then we should validate the npub We had a situation today where a user was unable to add a counterparty, and did not realise his npub was invalid. Nosta Me manages this ok: https://nosta.me/npub1qnkhmdy37hltzfslu6m3vfylymhwyumgjmasnrc0qqq2kfnrqrxlsxr6ny8 ALSO - we had an issue with an npub not working because it had a leading space both leading and trailing blanks should be automatically removed (but keep the ability to type them, eg "Tom Jones")
enes self-assigned this 2025-02-07 17:09:04 +00:00
enes added this to the MVP project 2025-02-07 17:09:12 +00:00
enes added the
Kind/Bug
label 2025-02-07 17:09:19 +00:00
enes moved this to In Progress in MVP on 2025-02-07 17:09:30 +00:00
Member

@b We have been validating the input and the npub, but if it was not valid npub1 we did normal search instead as a fallback
We could skip this fallback and show the error message instead? What are the chances someones user name starts with npub1?

@b We have been validating the input and the npub, but if it was not valid `npub1` we did normal search instead as a fallback We could skip this fallback and show the error message instead? What are the chances someones user name starts with `npub1`?
enes moved this to Pending in MVP on 2025-02-18 16:46:54 +00:00
enes moved this to In Progress in MVP on 2025-02-18 16:47:12 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigit/sigit.io#308
No description provided.