diff --git a/common/identity.ts b/common/identity.ts index b975c07..7a011ad 100644 --- a/common/identity.ts +++ b/common/identity.ts @@ -1,5 +1,4 @@ import type { DidDocument } from "@atcute/identity"; -import type { WebDidDocumentResolver } from "@atcute/identity-resolver"; import type { ATProtoUniverse } from "@char/lexicon.ts/atproto"; import { XRPC } from "@char/lexicon.ts/rpc"; @@ -20,11 +19,10 @@ export async function resolveDid(did: string): Promise { return doc; } else if (did.startsWith("did:web:")) { // TODO: write our own did:web resolver (maybe use a CORS proxy on clientside) - const resolver: WebDidDocumentResolver = await import( + const { WebDidDocumentResolver } = await import( "@atcute/identity-resolver" - ) - .then((m) => m.WebDidDocumentResolver) - .then((r) => new r()); + ); + const resolver = new WebDidDocumentResolver(); return resolver.resolve(did as `did:web:${string}`); }