Repository navigation
Conversation
Collaborator
|
Thanks for digging into this. We checked it against the API and aren't taking the change, because the camelCase spelling is the one the server reads. The OpenAPI spec lists this query parameter as If you have a request where |
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
NFTsAPI.validateMetadata()built its query string by hand and spelled theparameter
ignoreCachedItemUrls. The API documents it asignore_cached_item_urls, so the camelCase spelling put an undocumentedparameter on the wire, which the server accepts and ignores.
Calling
api.nfts.validateMetadata(contract, tokenId, chain, true)thereforereturned the cached item URLs — the exact thing the flag exists to avoid — with
no error to notice. That is the same silent-failure mode as the deprecated
nextin place ofcursorthattest/api/queryArgsDrift.spec.tswas writtenfor; it slipped past that test because the parameter is positional rather than a
field on a
*Argsinterface.Why it is easy to miss
This is the only hand-built query string in the SDK. Everywhere else, parameters
go through
objectToSearchParams(snakeizeKeysDeep(query))inOpenSeaAPI.get,or are written in snake_case by hand (
walletAuth.ts:tool_id,registry_chain,content_type, …).post()takes a body rather than a queryobject, so nothing snakeizes this one.
The change
src/api/nfts.ts— sendignore_cached_item_urls. The string is nowassembled with
URLSearchParams, like the other hand-built query strings inthe package, so an explicit
falseis sent rather than dropped. The JSDocrecords why the wire spelling is snake_case so the two cannot drift again.
Scope
One behaviour change on one endpoint, no refactor, no public type change. The
deprecated
api.validateNFTMetadata()forwarder is unaffected (it delegates,and
forwarderSignatures.spec.tsstill holds).