mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 08:40:52 +08:00
Use existing resolver in getRegistration
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -57,12 +57,15 @@ state.subscribe((s: Connection) => {
|
||||
console.log("register.state", s);
|
||||
});
|
||||
|
||||
export async function getRegistration(name: string, config: Config): Promise<Registration | null> {
|
||||
export async function getRegistration(name: string, config: Config, resolver?: Resolver): Promise<Registration | null> {
|
||||
name = name.toLowerCase();
|
||||
|
||||
const resolver = await config.provider.getResolver(name);
|
||||
if (! resolver) {
|
||||
return null;
|
||||
resolver = await config.provider.getResolver(name);
|
||||
|
||||
if (! resolver) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const meta = await Promise.allSettled([
|
||||
|
||||
+1
-1
@@ -266,7 +266,7 @@ export async function resolveEnsProfile(addressOrName: string, profileType: Prof
|
||||
const resolver = await config.provider.getResolver(name);
|
||||
|
||||
if (profileType === ProfileType.Full) {
|
||||
const registration = await getRegistration(name, config);
|
||||
const registration = await getRegistration(name, config, resolver);
|
||||
if (registration) {
|
||||
return registration.profile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user