Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: floor price dose not load on profile page #8259

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading