Skip to content

Commit

Permalink
feat: psp34 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Jun 25, 2023
1 parent ab72217 commit 517001e
Show file tree
Hide file tree
Showing 38 changed files with 4,024 additions and 5,879 deletions.
3 changes: 2 additions & 1 deletion apps/web/src/domains/nfts/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const _nftsState = atomFamily<BaseNft[], string>({
key: '_Nfts',
effects: (address: string) => [
({ setSelf }) => {
const batchSize = 100
const batchSize = 50

let initialResolve = (_value: BaseNft[]) => {}
let initialReject = (_reason?: any) => {}
Expand All @@ -42,6 +42,7 @@ const _nftsState = atomFamily<BaseNft[], string>({
const nfts = nftsOrErrors.filter((nft): nft is BaseNft => !('error' in nft))

errors.forEach(error => Sentry.captureException(error))
errors.forEach(console.error)

return { nfts: [...prev.nfts, ...nfts], errors: [...prev.errors, ...errors] }
},
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/domains/nfts/worker.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {
createAcalaNftAsyncGenerator,
createArtZeroNftsAsyncGenerator,
createBitCountryNftAsyncGenerator,
createEvmNftAsyncGenerator,
createParasNftsAsyncGenerator,
createRmrk2NftAsyncGenerator,
createStatemineNftAsyncGenerator,
createUniqueNetworkNftAsyncGenerator,
Expand All @@ -17,7 +19,9 @@ const subscribeNfts = (address: string, options: { batchSize: number }) =>
? [createEvmNftAsyncGenerator]
: [
createAcalaNftAsyncGenerator,
createArtZeroNftsAsyncGenerator,
createBitCountryNftAsyncGenerator,
createParasNftsAsyncGenerator,
createRmrk2NftAsyncGenerator,
createStatemineNftAsyncGenerator,
createUniqueNetworkNftAsyncGenerator,
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/routes/portfolio/collectibles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ const NftCard = ({ nft }: { nft: Nft }) => {
<article>
<Text.BodyLarge as="div">Edition</Text.BodyLarge>
<Text.BodyLarge alpha="high">
#{nft.serialNumber}
{nft.collection?.totalSupply && ` / ${nft.collection.totalSupply}`}
#{nft.serialNumber.toString()}
{Number(nft.collection?.totalSupply ?? 0) > 0 &&
` / ${nft.collection?.totalSupply?.toString() ?? ''}`}
</Text.BodyLarge>
</article>
)}
Expand Down
50 changes: 0 additions & 50 deletions packages/nft/generated/gql/rmrk1/fragment-masking.ts

This file was deleted.

50 changes: 0 additions & 50 deletions packages/nft/generated/gql/rmrk1/gql.ts

This file was deleted.

Loading

0 comments on commit 517001e

Please sign in to comment.