From d360734db30b4404f69da65d19ca95f59639cbda Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Oct 2026 10:31:42 +0300 Subject: [PATCH] fix(nfts): send ignore_cached_item_urls as snake_case on the wire --- src/api/nfts.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/api/nfts.ts b/src/api/nfts.ts index 02dca5615..06ffa6fe1 100644 --- a/src/api/nfts.ts +++ b/src/api/nfts.ts @@ -149,6 +149,15 @@ export class NFTsAPI { /** * Validate NFT metadata by fetching and parsing it. + * + * `ignoreCachedItemUrls` is `ignore_cached_item_urls` on the wire. This is the + * one query string in the SDK built by hand — `post` takes a body, not a query + * object, so nothing snakeizes it — and every parameter the API documents is + * snake_case. Sending the camelCase spelling put an undocumented parameter on + * the URL, which the server accepts and ignores, so a caller asking for a + * re-fetch from source got the cached item URLs back with no error to notice. + * Same silent-failure mode as the deprecated `next` in place of `cursor` that + * `test/api/queryArgsDrift.spec.ts` was written for. */ async validateMetadata( address: string, @@ -158,7 +167,12 @@ export class NFTsAPI { ): Promise { let path = getValidateMetadataPath(chain, address, identifier) if (ignoreCachedItemUrls !== undefined) { - path += `?ignoreCachedItemUrls=${ignoreCachedItemUrls}` + // Built with URLSearchParams, like every other hand-assembled query string + // in the package, so `false` is sent rather than dropped. + const query = new URLSearchParams({ + ignore_cached_item_urls: String(ignoreCachedItemUrls), + }) + path += `?${query}` } const response = await this.fetcher.post(path) return response