Avoids calling out errors in LogCat when they don't exist.
This commit is contained in:
@@ -113,6 +113,8 @@ object LocalCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun isValidHexNpub(key: String): Boolean {
|
private fun isValidHexNpub(key: String): Boolean {
|
||||||
|
if (key.contains(":")) return false
|
||||||
|
|
||||||
return try {
|
return try {
|
||||||
Hex.decode(key).toNpub()
|
Hex.decode(key).toNpub()
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ object Nip19 {
|
|||||||
}
|
}
|
||||||
parsed?.copy(additionalChars = additionalChars ?: "")
|
parsed?.copy(additionalChars = additionalChars ?: "")
|
||||||
} catch (e: Throwable) {
|
} 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
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user