Skip to content

Conversation

@joaquim-verges
Copy link
Member

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


PR-Codex overview

This PR focuses on enhancing the getNFT, getOwnedNFTs, and getNFTs functions in the erc1155 extension to optionally use an insight API for fetching NFTs, improving performance and reliability.

Detailed summary

  • Added useIndexer option to GetNFTParams, GetOwnedNFTsParams, and GetNFTsParams.
  • Implemented getNFTFromInsight, getOwnedNFTsFromInsight, and getNFTsFromInsight functions.
  • Updated getNFT, getOwnedNFTs, and getNFTs to conditionally use the insight API.
  • Enhanced error handling for API calls.

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

@vercel
Copy link

vercel bot commented Apr 16, 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 17, 2025 11:46pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 11:46pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 11:46pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 11:46pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 11:46pm

@changeset-bot
Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: 6a73e69

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 16, 2025 23:48
@joaquim-verges joaquim-verges requested review from a team as code owners April 16, 2025 23:48
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 16, 2025
Copy link
Member Author


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.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 16, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 50.75 KB (+0.45% 🔺) 1.1 s (+0.45% 🔺) 219 ms (+120.13% 🔺) 1.3 s
thirdweb (cjs) 138.91 KB (+0.13% 🔺) 2.8 s (+0.13% 🔺) 384 ms (+53.9% 🔺) 3.2 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 67 ms (+917.36% 🔺) 179 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 40 ms (+1542.33% 🔺) 50 ms
thirdweb/react (minimal + tree-shaking) 19.36 KB (0%) 388 ms (0%) 138 ms (+482.31% 🔺) 525 ms

@joaquim-verges joaquim-verges force-pushed the _SDK_Use_insight_for_1155_getNFTs_getOwnedNFTs_and_getNFT branch from 46d64dd to 669932d Compare April 17, 2025 22:33
@joaquim-verges joaquim-verges force-pushed the _SDK_Use_insight_for_1155_getNFTs_getOwnedNFTs_and_getNFT branch from 8937a0a to e2e2056 Compare April 17, 2025 23:16
@codecov
Copy link

codecov bot commented Apr 17, 2025

Codecov Report

Attention: Patch coverage is 79.20354% with 47 lines in your changes missing coverage. Please review.

Project coverage is 55.18%. Comparing base (62ce05e) to head (6a73e69).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...irdweb/src/extensions/erc1155/read/getOwnedNFTs.ts 55.10% 22 Missing ⚠️
packages/thirdweb/src/insight/get-nfts.ts 82.69% 16 Missing and 2 partials ⚠️
...es/thirdweb/src/extensions/erc1155/read/getNFTs.ts 75.86% 7 Missing ⚠️

❌ Your patch status has failed because the patch coverage (79.20%) 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    #6753      +/-   ##
==========================================
+ Coverage   55.09%   55.18%   +0.08%     
==========================================
  Files         896      896              
  Lines       56703    56881     +178     
  Branches     3908     3941      +33     
==========================================
+ Hits        31243    31389     +146     
- Misses      25364    25395      +31     
- Partials       96       97       +1     
Flag Coverage Δ
packages 55.18% <79.20%> (+0.08%) ⬆️
Files with missing lines Coverage Δ
...ges/thirdweb/src/extensions/erc1155/read/getNFT.ts 96.38% <100.00%> (+4.07%) ⬆️
...es/thirdweb/src/extensions/erc1155/read/getNFTs.ts 87.71% <75.86%> (-12.29%) ⬇️
packages/thirdweb/src/insight/get-nfts.ts 88.00% <82.69%> (+1.40%) ⬆️
...irdweb/src/extensions/erc1155/read/getOwnedNFTs.ts 64.06% <55.10%> (-29.28%) ⬇️

... and 2 files with indirect coverage changes

🚀 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.

…g sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Joaquim Verges <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants