Skip to content

Commit

Permalink
fix: type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
travis committed Oct 9, 2023
1 parent f65ebb9 commit f47b9bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/components/SpaceRegistrar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState } from 'react';
import { useKeyring } from '@w3ui/react-keyring';
import Loader from './Loader';
import { DID } from '@ucanto/interface';

export function SpaceRegistrar (): JSX.Element {
const [{ account }, { registerSpace }] = useKeyring();
Expand All @@ -10,7 +11,7 @@ export function SpaceRegistrar (): JSX.Element {
if (account) {
setSubmitted(true);
try {
await registerSpace(account, { provider: import.meta.env.VITE_W3UP_PROVIDER });
await registerSpace(account, { provider: (process.env.NEXT_PUBLIC_W3UP_PROVIDER || 'did:web:web3.storage') as DID<'web'> });
} catch (err) {
console.log(err);
throw new Error('failed to register', { cause: err });
Expand Down
3 changes: 2 additions & 1 deletion src/components/SpaceSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { Uploader } from './Uploader';
import { UploadsList } from './UploadsList';
import { SpaceRegistrar } from './SpaceRegistrar';
import { DidIcon } from './DidIcon';
import { DIDKey } from '@ucanto/interface';

interface SpaceSectionProps {
viewSpace: (did: string) => void;
viewSpace: (did: DIDKey) => void;
setShare: (share: boolean) => void;
share: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const servicePrincipal = DID.parse(
export const serviceConnection = connect<Service>({
id: servicePrincipal,
codec: CAR.outbound,
channel: HTTP.open<Record<string, any>>({
channel: HTTP.open<any>({
url: serviceURL,
method: 'POST',
}),
Expand Down

0 comments on commit f47b9bc

Please sign in to comment.