-
Notifications
You must be signed in to change notification settings - Fork 544
SDK: Fallback to insight response if RPC request fails in getNFTs extensions #7234
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
SDK: Fallback to insight response if RPC request fails in getNFTs extensions #7234
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 3dfdb3c 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 |
WalkthroughThis update introduces improved error handling and fallback logic in NFT retrieval methods for ERC721 and ERC1155 extensions, ensuring partial data is returned if both primary and fallback sources fail. Additionally, React table header components in the dashboard are updated to include unique keys for empty header cells related to drawer buttons. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant ERC721/1155 getNFTs
participant RPC
participant InsightAPI
App->>ERC721/1155 getNFTs: Request NFTs
ERC721/1155 getNFTs->>RPC: Fetch NFTs via RPC
alt RPC Success
RPC-->>ERC721/1155 getNFTs: Return NFTs
ERC721/1155 getNFTs-->>App: Return NFTs
else RPC Fails
ERC721/1155 getNFTs->>InsightAPI: Fetch NFTs via Insight API
alt InsightAPI returns expected count
InsightAPI-->>ERC721/1155 getNFTs: Return NFTs
ERC721/1155 getNFTs-->>App: Return NFTs
else InsightAPI returns less than expected
InsightAPI-->>ERC721/1155 getNFTs: Return partial NFTs
ERC721/1155 getNFTs->>RPC: Try fallback RPC (inside try-catch)
alt RPC fallback succeeds
RPC-->>ERC721/1155 getNFTs: Return NFTs
ERC721/1155 getNFTs-->>App: Return NFTs
else RPC fallback fails
ERC721/1155 getNFTs-->>App: Return partial NFTs from InsightAPI
end
end
end
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (5)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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. |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) 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 #7234 +/- ##
==========================================
- Coverage 55.62% 55.61% -0.01%
==========================================
Files 908 908
Lines 58575 58583 +8
Branches 4132 4133 +1
==========================================
+ Hits 32582 32583 +1
- Misses 25886 25894 +8
+ Partials 107 106 -1
🚀 New features to boost your workflow:
|
0b458d5
to
3dfdb3c
Compare
…c_request_fails_in_erc721_erc1155_extensions
PR-Codex overview
This PR focuses on improving the
getNFTs
functionality in theERC721
andERC1155
extensions by adding error handling for RPC requests. It also makes minor adjustments to the table components in the dashboard.Detailed summary
key="drawer"
to the empty header intable.tsx
andmarketplace-table.tsx
.getNFTs
forERC721
andERC1155
:try-catch
block.Summary by CodeRabbit
New Features
Bug Fixes