···1616 {
1717 const exifRemoved = removeExif(new Uint8Array(await blob.arrayBuffer()));
1818 if (exifRemoved !== null) {
1919- blob = new Blob([exifRemoved], { type: blob.type });
1919+ blob = new Blob([exifRemoved as Uint8Array<ArrayBuffer>], { type: blob.type });
2020 }
2121 }
2222···8080 const exifRemoved = removeExif(new Uint8Array(await blob.arrayBuffer()));
81818282 if (exifRemoved !== null) {
8383- blob = new Blob([exifRemoved], { type: blob.type });
8383+ blob = new Blob([exifRemoved as Uint8Array<ArrayBuffer>], { type: blob.type });
8484 }
8585 }
8686
+21-29
src/main.tsx
···22import { type JSX, createSignal, onMount } from 'solid-js';
33import { render } from 'solid-js/web';
4455-import { Client, ok, simpleFetchHandler } from '@atcute/client';
66-import type { DidDocument } from '@atcute/identity';
77-import type { Did } from '@atcute/lexicons';
55+import type { Did, Handle } from '@atcute/lexicons';
86import { configureOAuth } from '@atcute/oauth-browser-client';
97108import * as navigation from '~/globals/navigation';
···35333634// Configure OAuth
3735{
3838- const resolver = new Client({
3939- handler: simpleFetchHandler({ service: location.origin }),
4040- });
4141-4236 configureOAuth({
4337 metadata: {
4438 client_id: import.meta.env.VITE_OAUTH_CLIENT_ID,
4539 redirect_uri: import.meta.env.VITE_OAUTH_REDIRECT_URL,
4640 },
47414848- didDocumentResolver: {
4949- async resolve(did) {
5050- const data = await ok(
5151- resolver.get('com.atproto.identity.resolveDid', {
5252- params: {
5353- did: did,
5454- },
5555- }),
5656- );
4242+ identityResolver: {
4343+ async resolve(actor) {
4444+ const url = new URL('https://slingshot.microcosm.blue/xrpc/com.bad-example.identity.resolveMiniDoc');
4545+ url.searchParams.set('identifier', actor);
57465858- return data.didDoc as unknown as DidDocument;
5959- },
6060- },
6161- handleResolver: {
6262- async resolve(handle) {
6363- const data = await ok(
6464- resolver.get('com.atproto.identity.resolveHandle', {
6565- params: {
6666- handle: handle,
6767- },
6868- }),
6969- );
4747+ const response = await fetch(url);
4848+ if (!response.ok) {
4949+ throw new Error(`resolver responded with status ${response.status}`);
5050+ }
5151+5252+ const json = (await response.json()) as {
5353+ did: Did;
5454+ handle: Handle;
5555+ pds: string;
5656+ signing_key: string;
5757+ };
70587171- return data.did as Did<'plc' | 'web'>;
5959+ return {
6060+ did: json.did,
6161+ handle: json.handle,
6262+ pds: json.pds,
6363+ };
7264 },
7365 },
7466 });
+1-1
src/views/bluemoji-emotes.tsx
···2727 const handleBlob = async (blob: Blob) => {
2828 const exifRemoved = removeExif(new Uint8Array(await blob.arrayBuffer()));
2929 if (exifRemoved !== null) {
3030- blob = new Blob([exifRemoved], { type: blob.type });
3030+ blob = new Blob([exifRemoved as Uint8Array<ArrayBuffer>], { type: blob.type });
3131 }
32323333 if (blob.size > MAX_ORIGINAL_SIZE) {
+1-1
src/views/oauth-callback.tsx
···2323 // Do this on global history instance so it doesn't affect this page rendering.
2424 history.replaceState(null, '', '/');
25252626- const session = await finalizeAuthorization(params);
2626+ const { session } = await finalizeAuthorization(params);
2727 const did = session.info.sub;
28282929 const agent = new OAuthUserAgent(session);