fix: harden Retry-After parsing, fix and audit all docs#1944
Merged
Conversation
- Fix Retry-After parsing to reject malformed values like "5s" and "1.5" that previously fell through to date parsing and returned incorrect delays - Fix event listener examples: correct payloads for TransactionDenied, TransactionFailed, CancelOrder; add missing ApproveOrder, Transfer, ApproveAllAssets events - Replace deprecated getOrder/getOrders usage in docs with current collection-based and NFT-specific endpoints - Add postListing/postOffer documentation to api-reference - Mark deprecated methods (getOrder, getOrders, postOrder) in api-reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bd20c95 to
586b3b9
Compare
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
"5s"and"1.5"previously bypassed the integer check and fell through toDate.parse(), which could return nonsensical retry delays (e.g. 300s). Now all numeric-looking strings are caught early and only pure integers are accepted.TransactionDenied,TransactionFailed,MatchOrders, andCancelOrderto match actualdispatch()calls in source. Added missingApproveOrder,Transfer, andApproveAllAssetsevents.getOrder()/getOrders()examples for currentgetAllOffers,getAllListings,getNFTOffers,getNFTListingsendpoints.postListingandpostOfferto api-reference.md.getOrder,getOrders, andpostOrderin api-reference.md.Incorporates work from PRs #1942 and #1941 with fixes.
Test plan
undefinedfor"5s"and"1.5""5"→ 5)🤖 Generated with Claude Code
Co-Authored-By: farquadars farquadars@users.noreply.github.com
Co-Authored-By: jeffbrownn jeffbrownn@users.noreply.github.com