diff --git a/src/profile.ts b/src/profile.ts index cb591c83c..b988bc9b6 100644 --- a/src/profile.ts +++ b/src/profile.ts @@ -1,3 +1,4 @@ +import { ethers } from "ethers"; import type { Registration } from "@app/base/registrations/registrar"; import type { BasicProfile } from "@ceramicstudio/idx-constants"; import { @@ -63,6 +64,12 @@ export class Profile { private static async lookupAddress(address: string, config: Config): Promise<[IProfile, string]> { const profile: IProfile = { ens: null, idx: null }; + try { + address = ethers.utils.getAddress(address); + } catch { + address = await config.provider.resolveName(address); + } + try { const [ens, idx] = await Promise.allSettled([ resolveEnsProfile(address, config),