Skip to content

Commit

Permalink
Merge branch 'main' into isssue-10207
Browse files Browse the repository at this point in the history
  • Loading branch information
hassnian committed May 18, 2024
2 parents cd10b72 + 90848dc commit 33749b2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion components/collection/utils/useCollectionDetails.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getVolume } from '@/utils/math'
import { NFT } from '@/components/rmrk/service/scheme'
import { NFT, NFTMetadata } from '@/components/rmrk/service/scheme'
import { NFTListSold } from '@/components/identity/utils/useIdentity'
import { Stats } from './types'
import { processSingleMetadata } from '@/utils/cachingStrategy'
import collectionBuyEventStatsById from '@/queries/subsquid/general/collectionBuyEventStatsById.query'

export const useCollectionDetails = ({
Expand Down Expand Up @@ -126,5 +127,15 @@ export const useCollectionMinimal = ({

watch(variables, () => refetch(variables.value))

watchEffect(async () => {
const metadata = collection.value?.metadata
if (metadata && !collection.value?.meta) {
const meta = (await processSingleMetadata(metadata)) as NFTMetadata
if (meta) {
collection.value.meta = meta
}
}
})

return { collection }
}
4 changes: 3 additions & 1 deletion components/create/modals/CollectionSuccessModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ const collectionPath = computed(
() => `/${urlPrefix.value}/collection/${props.collection?.id}`,
)
const addNftsPath = computed(() => `/${urlPrefix.value}/create/nft`)
const addNftsPath = computed(
() => `/${urlPrefix.value}/create/nft?collectionId=${props.collection?.id}`,
)
const share = computed(() => ({
text: $i18n.t('sharing.collection'),
Expand Down

0 comments on commit 33749b2

Please sign in to comment.