Merge pull request #428 from davotoula/bugfix_case_sensitive_nip05

Bugfix case sensitive nip05
This commit is contained in:
Vitor Pamplona
2023-05-28 16:09:37 -04:00
committed by GitHub
2 changed files with 123 additions and 2 deletions
@@ -76,13 +76,13 @@ class Nip05Verifier() {
nip05,
onSuccess = {
val nip05url = try {
mapper.readTree(it)
mapper.readTree(it.lowercase())
} catch (t: Throwable) {
onError("Error Parsing JSON from Lightning Address. Check the user's lightning setup")
null
}
val user = nip05.split("@")[0]
val user = nip05.split("@")[0].lowercase()
val hexKey = nip05url?.get("names")?.get(user)?.asText()