Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Lowercase ENS name search query
Sebastian Martinez committed 3 years ago
commit c57bafb78df393c147d12918085609b042d7611b
parent a47bffdddf4676ef0985346c30ab16b00501f7c9
1 file changed +10 -2
modified src/resolver.ts
@@ -53,9 +53,14 @@ export async function resolve(
        results.projects.push(...projects);

        // ========= ENS Names =========
+
        const normalizedQuery = q.toLowerCase();
        let profile: Profile | null;
        try {
-
          profile = await Profile.get(q, ProfileType.Minimal, config);
+
          profile = await Profile.get(
+
            normalizedQuery,
+
            ProfileType.Minimal,
+
            config,
+
          );
        } catch (e) {
          profile = null;
        }
@@ -71,7 +76,10 @@ export async function resolve(
          let profiles: Profile[];
          try {
            profiles = await Profile.getMulti(
-
              [`${q}.${config.registrar.domain}`, `${q}.eth`],
+
              [
+
                `${normalizedQuery}.${config.registrar.domain}`,
+
                `${normalizedQuery}.eth`,
+
              ],
              config,
            );
          } catch (e) {