mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-23 19:59:25 +02:00
Removing comments from NIP19 Parser
This commit is contained in:
@@ -18,8 +18,6 @@ object Nip19 {
|
|||||||
if (uri == null) return null
|
if (uri == null) return null
|
||||||
|
|
||||||
try {
|
try {
|
||||||
println("Issue trying to Decode NIP19 $uri")
|
|
||||||
|
|
||||||
val matcher = nip19regex.matcher(uri)
|
val matcher = nip19regex.matcher(uri)
|
||||||
matcher.find()
|
matcher.find()
|
||||||
val uriScheme = matcher.group(1) // nostr:
|
val uriScheme = matcher.group(1) // nostr:
|
||||||
@@ -27,8 +25,6 @@ object Nip19 {
|
|||||||
val key = matcher.group(3) // bech32
|
val key = matcher.group(3) // bech32
|
||||||
val additionalChars = matcher.group(4) ?: "" // additional chars
|
val additionalChars = matcher.group(4) ?: "" // additional chars
|
||||||
|
|
||||||
println("Issue trying to Decode NIP19 Additional Chars $additionalChars")
|
|
||||||
|
|
||||||
val bytes = (type + key).bechToBytes()
|
val bytes = (type + key).bechToBytes()
|
||||||
val parsed = when (type.lowercase()) {
|
val parsed = when (type.lowercase()) {
|
||||||
"npub1" -> npub(bytes)
|
"npub1" -> npub(bytes)
|
||||||
|
Reference in New Issue
Block a user