mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 00:31:03 +08:00
Resolve all ENS names
This commit is contained in:
@@ -224,7 +224,7 @@
|
||||
<div class="member-icon">
|
||||
<Avatar source={profile.avatar ?? address} />
|
||||
</div>
|
||||
<Address {address} compact resolve noAvatar {config} />
|
||||
<Address {address} compact resolve noAvatar {profile} {config} />
|
||||
</div>
|
||||
{/await}
|
||||
{/each}
|
||||
|
||||
+3
-4
@@ -231,7 +231,6 @@ export async function resolveLabel(label: string | undefined, config: Config): P
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// Resolves an IDX profile or return null
|
||||
export async function resolveIdxProfile(caip10: string, config: Config): Promise<BasicProfile | null> {
|
||||
return config.idx.client.get<BasicProfile>("basicProfile", caip10);
|
||||
@@ -239,9 +238,9 @@ export async function resolveIdxProfile(caip10: string, config: Config): Promise
|
||||
|
||||
// Resolves an ENS profile or return null
|
||||
export async function resolveEnsProfile(address: string, config: Config): Promise<Registration | null> {
|
||||
const label = await config.provider.lookupAddress(address);
|
||||
if (label && await resolveLabel(parseEnsLabel(label, config), config)) {
|
||||
return await getRegistration(label, config);
|
||||
const name = await config.provider.lookupAddress(address);
|
||||
if (name) {
|
||||
return await getRegistration(name, config);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user