Skip to content

Commit

Permalink
fix: floor price dose not load on profile page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarsen136 committed Nov 26, 2023
1 parent 0c3ed09 commit 8c9bd44
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion components/items/ItemsGrid/ItemsGridImageTokenEntity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const onClickShoppingCart = async () => {
const onClickListingCart = async () => {
const nftsToProcess = await getTokensNfts([props.entity])
const floorPrice = nftsToProcess[0].collection.floorPrice[0].price
const floorPrice = nftsToProcess[0].collection.floorPrice[0]?.price || '0'
for (const nft of nftsToProcess) {
if (listingCartStore.isItemInCart(nft.id)) {
Expand Down
11 changes: 4 additions & 7 deletions queries/subsquid/ahk/nftListWithSearch.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ query nftListWithSearch(
collection {
id
name
floorPrice: nfts (
where: {
burned_eq: false,
},
orderBy: price_ASC,
floorPrice: nfts(
where: { burned_eq: false, price_gt: "0" }
orderBy: price_ASC
limit: 1
)
{
) {
price
}
}
Expand Down
2 changes: 1 addition & 1 deletion queries/subsquid/general/nftListWithSearch.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ query nftListWithSearch(
id
name
floorPrice: nfts(
where: { burned_eq: false }
where: { burned_eq: false, price_gt: "0" }
orderBy: price_ASC
limit: 1
) {
Expand Down
11 changes: 4 additions & 7 deletions queries/subsquid/ksm/nftListWithSearch.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ query nftListWithSearch(
collection {
id
name
floorPrice: nfts (
where: {
burned_eq: false,
},
orderBy: price_ASC,
floorPrice: nfts(
where: { burned_eq: false, price_gt: "0" }
orderBy: price_ASC
limit: 1
)
{
) {
price
}
}
Expand Down
11 changes: 4 additions & 7 deletions queries/subsquid/rmrk/nftListWithSearch.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ query nftListWithSearch(
collection {
id
name
floorPrice: nfts (
where: {
burned_eq: false,
},
orderBy: price_ASC,
floorPrice: nfts(
where: { burned_eq: false, price_gt: "0" }
orderBy: price_ASC
limit: 1
)
{
) {
price
}
}
Expand Down

0 comments on commit 8c9bd44

Please sign in to comment.