Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 18, 2025


PR-Codex overview

This PR focuses on enhancing the fallback mechanisms for retrieving NFT data when there are cache misses, ensuring more reliable data retrieval from the thirdweb ecosystem.

Detailed summary

  • Added THIRDWEB_INSIGHT_API_DOMAIN constant.
  • Included THIRDWEB_INSIGHT_API_DOMAIN in the getThirdwebClient function.
  • Updated getNFT and getNFTs functions to fallback to RPC if NFT data is not found.
  • Implemented Promise.all for concurrent fetching in getNFTs.
  • Set useIndexer to false in RPC calls for both ERC721 and ERC1155.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Apr 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 8:48am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 8:48am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 8:48am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 8:48am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 8:48am

@changeset-bot
Copy link

changeset-bot bot commented Apr 18, 2025

🦋 Changeset detected

Latest commit: e870cad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch

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

@joaquim-verges joaquim-verges marked this pull request as ready for review April 18, 2025 08:37
@joaquim-verges joaquim-verges requested a review from a team as a code owner April 18, 2025 08:37
@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. packages SDK Involves changes to the thirdweb SDK labels Apr 18, 2025
@joaquim-verges joaquim-verges requested a review from a team as a code owner April 18, 2025 08:37
Copy link
Member Author

joaquim-verges commented Apr 18, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 75.55556% with 11 lines in your changes missing coverage. Please review.

Project coverage is 55.17%. Comparing base (3a43fb2) to head (e870cad).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...es/thirdweb/src/extensions/erc1155/read/getNFTs.ts 71.42% 6 Missing ⚠️
...ges/thirdweb/src/extensions/erc721/read/getNFTs.ts 81.81% 3 Missing and 1 partial ⚠️
...ages/thirdweb/src/extensions/erc721/read/getNFT.ts 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (75.55%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6765   +/-   ##
=======================================
  Coverage   55.16%   55.17%           
=======================================
  Files         896      896           
  Lines       56910    56903    -7     
  Branches     3938     3940    +2     
=======================================
  Hits        31396    31396           
+ Misses      25419    25411    -8     
- Partials       95       96    +1     
Flag Coverage Δ
packages 55.17% <75.55%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...ges/thirdweb/src/extensions/erc1155/read/getNFT.ts 95.52% <100.00%> (-0.87%) ⬇️
...ages/thirdweb/src/extensions/erc721/read/getNFT.ts 84.61% <0.00%> (+11.03%) ⬆️
...ges/thirdweb/src/extensions/erc721/read/getNFTs.ts 90.21% <81.81%> (-2.29%) ⬇️
...es/thirdweb/src/extensions/erc1155/read/getNFTs.ts 84.05% <71.42%> (-3.67%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 50.75 KB (0%) 1.1 s (0%) 139 ms (+94.53% 🔺) 1.2 s
thirdweb (cjs) 139.02 KB (+0.09% 🔺) 2.8 s (+0.09% 🔺) 234 ms (+34.93% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 51 ms (+1088.65% 🔺) 163 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 23 ms (+1054.4% 🔺) 33 ms
thirdweb/react (minimal + tree-shaking) 19.36 KB (0%) 388 ms (0%) 85 ms (+524.42% 🔺) 472 ms

Copy link
Member

@jnsdls jnsdls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codecov is unhappy but otherwise LGTM

@joaquim-verges joaquim-verges merged commit 03e2385 into main Apr 18, 2025
25 of 26 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Improve_NFT_data_fallbacks_for_indexer_cache_misses branch April 18, 2025 08:50
@joaquim-verges joaquim-verges mentioned this pull request Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants