Skip to content

Commit

Permalink
fix fetch claim
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Jan 9, 2025
1 parent 82be396 commit 8571270
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/space/[did]/root/[cid]/shard/[shard]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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

0 comments on commit 8571270

Please sign in to comment.