Displays error messages when the URI sent to Amethyst is invalid
This commit is contained in:
Vitor Pamplona
2024-02-12 16:03:37 -05:00
parent bbc4ec2625
commit 1deed59d5b
5 changed files with 83 additions and 23 deletions
@@ -97,7 +97,12 @@ object Nip19 {
"naddr1" -> naddr(bytes)
else -> null
}
parsed?.copy(additionalChars = additionalChars ?: "")
if (parsed?.hex?.isBlank() == true) {
null
} else {
parsed?.copy(additionalChars = additionalChars ?: "")
}
} catch (e: Throwable) {
Log.w("NIP19 Parser", "Issue trying to Decode NIP19 $key: ${e.message}", e)
null