-
Notifications
You must be signed in to change notification settings - Fork 619
[TOOL-3096] React SDK: Fix NFT components not including contract address in queryKey #5966
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
[TOOL-3096] React SDK: Fix NFT components not including contract address in queryKey #5966
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 4ffcf30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
379882b to
da9f1a5
Compare
size-limit report 📦
|
da9f1a5 to
b49676e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5966 +/- ##
=======================================
Coverage 54.81% 54.82%
=======================================
Files 1150 1150
Lines 61195 61200 +5
Branches 5153 5154 +1
=======================================
+ Hits 33545 33550 +5
Misses 26923 26923
Partials 727 727
*This pull request uses carry forward flags. Click here to find out more.
|
Merge activity
|
…ess in queryKey (#5966) <!-- start pr-codex --> ## PR-Codex overview This PR focuses on improving the handling of NFT metadata by fixing issues with caching when multiple contracts share the same token ID. It updates various components to include the `contractAddress` in the query keys for better differentiation. ### Detailed summary - Added `contractAddress` to query keys in `getQueryKey` functions in `name.tsx`, `media.tsx`, and `description.tsx`. - Updated related tests in `name.test.tsx` and `media.test.tsx` to include `contractAddress`. - Fixed caching issue for NFT components with identical token IDs across contracts. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
b49676e to
7d2aa81
Compare
…ess in queryKey (#5966) <!-- start pr-codex --> ## PR-Codex overview This PR focuses on improving the handling of NFT metadata in components by ensuring that the `contractAddress` is included in the query keys. This change addresses issues with incorrect caching when rendering multiple contracts with the same token ID. ### Detailed summary - Added `contractAddress` to the query keys in `getQueryKey` functions for `NFTDescription`, `NFTName`, and `NFTMedia`. - Updated tests in `media.test.tsx` and `name.test.tsx` to include `contractAddress` when calling `getQueryKey`. - Fixed metadata display issues when multiple contracts with the same token ID are rendered. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
7d2aa81 to
f8f0bcb
Compare
…ess in queryKey (#5966) <!-- start pr-codex --> ## PR-Codex overview This PR focuses on fixing issues with NFT components not displaying the correct metadata when multiple contracts share the same token ID. It improves caching by including `contractAddress` in the query keys for NFT metadata retrieval. ### Detailed summary - Added `contractAddress` to query keys in `getQueryKey` functions for `NFTName`, `NFTMedia`, and `NFTDescription`. - Updated related queries in `name.tsx`, `media.tsx`, and `description.tsx` to use `contract.address`. - Enhanced tests in `name.test.tsx` and `media.test.tsx` to validate the inclusion of `contractAddress` in query keys. - Updated changelog to document the fix for metadata display issues. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
f8f0bcb to
1afab7e
Compare
…ess in queryKey (#5966) <!-- start pr-codex --> ## PR-Codex overview This PR focuses on improving the handling of NFT metadata in the `thirdweb` library by adding `contractAddress` to various query keys, which resolves issues with metadata caching when multiple contracts share the same token ID. ### Detailed summary - Added `contractAddress` to the query keys in `getQueryKey` functions for `NFTName`, `NFTMedia`, and `NFTDescription`. - Updated related queries to include `contractAddress`. - Fixed metadata display issues when rendering multiple contracts with the same token ID. - Enhanced tests in `name.test.tsx` and `media.test.tsx` to validate the new `contractAddress` parameter. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
ce313f9 to
4ffcf30
Compare

PR-Codex overview
This PR focuses on fixing the caching issue in NFT components that caused incorrect metadata display when multiple contracts had the same token ID. It introduces
contractAddressas a parameter in various functions to ensure proper data retrieval.Detailed summary
contractAddressto the query keys ingetQueryKeyfunctions forNFTName,NFTMedia, andNFTDescription.media.test.tsxandname.test.tsxto includecontractAddress.