Avoids triggering exceptions when the NIP19 parser receives a simple hex key

This commit is contained in:
Vitor Pamplona
2023-04-04 11:21:36 -04:00
parent 15822fee8e
commit b685b38565
@@ -19,7 +19,10 @@ object Nip19 {
try {
val matcher = nip19regex.matcher(uri)
matcher.find()
if (!matcher.find()) {
return null
}
val uriScheme = matcher.group(1) // nostr:
val type = matcher.group(2) // npub1
val key = matcher.group(3) // bech32