fix(market): scope Pinto pod listings to marketplace "0"#423
Merged
Conversation
On the Pinto marketplace tab, podMarketplaceId was undefined, which caused usePodListings/usePodOrders to skip the podMarketplace filter entirely and return listings from both fields. Beanstalk-field listings (field 1) have indices in a different index space, so the place-in-line filter in FillListing rejected all of them, producing "Purchaseable Pods: 0" even when Pinto listings existed. Default to "0" to match the fieldId pattern on the line above and the ?? "0" fallback already used in useAllMarket. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
✅ Deploy Preview for pintomoney ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The committed generated types in src/generated/gql/ had drifted from the current subgraph schemas (deprecated *_nocase filter variants and a few similar fields were removed upstream). CI's "Check codegen is up to date" step was failing on this PR (and had been failing on every PR since 2026-03-21). Running `yarn generate` to refresh. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/pages/Market.tsx:222setpodMarketplaceId = undefinedfor the Pinto tab.usePodListings/usePodOrdersonly apply thepodMarketplaceGraphQL filter when the value is truthy, soundefinedcaused them to return listings from both fields. Beanstalk-field listings (field 1) have indices in a different index space, so the place-in-line filter atFillListing.tsx:349(listingIndex.lte(maxPlaceIndex), wheremaxPlaceIndexis built from Pinto'sactiveHarvestableIndex) rejected all of them → 0 purchaseable."0"on the Pinto tab, matching thefieldId = isBeanstalkMarketplace ? 1n : 0npattern on the line directly above and the?? "0"fallback already used inuseAllMarket.ts:25-26.Technical details
One-line change in
src/pages/Market.tsx:The corrected value flows through
BeanstalkMarketContextto all consumers:FillListing(fixes the reported "Purchaseable Pods: 0" bug)PodListingsTable,PodOrdersTable,FillOrder(same inconsistency, now consistent)Side effect: The chart on the Pinto tab will no longer display Beanstalk-field listings. Those were never actually fillable from the Pinto tab anyway —
fillPodListingis called withfieldId=0on that tab, so any attempt to fill a Beanstalk listing would have reverted on-chain.Test plan
PodListingsTable/PodOrdersTableonly show listings/orders for the active marketplace🤖 Generated with Claude Code