Skip to content

Commit 8571270

Browse files
committed
fix fetch claim
1 parent 82be396 commit 8571270

File tree

1 file changed

+3
-3
lines changed
  • src/app/space/[did]/root/[cid]/shard/[shard]

1 file changed

+3
-3
lines changed

src/app/space/[did]/root/[cid]/shard/[shard]/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import { CAR } from '@ucanto/transport'
44
import { H2 } from '@/components/Text'
5-
import { useW3, FilecoinInfoSuccess, BlobGetSuccess, CARLink } from '@w3ui/react'
5+
import { useW3, FilecoinInfoSuccess, CARLink } from '@w3ui/react'
66
import useSWR from 'swr'
77
import { Link, parse as parseLink } from 'multiformats/link'
88
import DefaultLoader from '@/components/Loader'
99
import * as Claims from '@web3-storage/content-claims/client'
10-
import { Aggregate, MerkleTreeNode, Piece, PieceLink, PieceView, Proof, ProofData } from '@web3-storage/data-segment'
10+
import { Aggregate, Piece, PieceLink, PieceView, Proof, ProofData } from '@web3-storage/data-segment'
1111
import CopyIcon from '@/components/CopyIcon'
1212
import { EqualsClaim } from '@web3-storage/content-claims/client/api'
1313
import { Breadcrumbs } from '@/components/Breadcrumbs'
@@ -73,7 +73,7 @@ export default function ItemPage ({ params }: PageProps): JSX.Element {
7373
const claimKey = `/assert/equals?content=${shard}`
7474
const claim = useSWR<EqualsClaim|undefined>(claimKey, {
7575
fetcher: async () => {
76-
const claims = await Claims.read(shard)
76+
const claims = await Claims.read(shard.multihash)
7777
for (const claim of claims) {
7878
if (claim.type === 'assert/equals' && isPieceLink(claim.equals)) {
7979
return claim

0 commit comments

Comments
 (0)