Avoids calling out errors in LogCat when they don't exist.

This commit is contained in:
Vitor Pamplona 2023-06-23 12:01:46 -04:00
parent 5137009f5f
commit c24ba18207
2 changed files with 3 additions and 1 deletions

View File

@ -113,6 +113,8 @@ object LocalCache {
}
private fun isValidHexNpub(key: String): Boolean {
if (key.contains(":")) return false
return try {
Hex.decode(key).toNpub()
true

View File

@ -67,7 +67,7 @@ object Nip19 {
}
parsed?.copy(additionalChars = additionalChars ?: "")
} catch (e: Throwable) {
Log.e("NIP19 Parser", "Issue trying to Decode NIP19 $key: ${e.message}", e)
Log.w("NIP19 Parser", "Issue trying to Decode NIP19 $key: ${e.message}", e)
null
}
}