Use lowercase versions of user name and retrieved json to make case insensitive match

This commit is contained in:
David Kaspar
2023-05-27 21:56:57 +01:00
parent b0a61cce42
commit aa0a4d1aac
@@ -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()