From a3821d00b4710cdb3810b95651638f3981820b59 Mon Sep 17 00:00:00 2001 From: madisoncarter1234 Date: Fri, 28 Nov 2025 10:30:13 -0500 Subject: [PATCH] Fix: Use correct function for listing payment token cache The listing payment token cache was incorrectly using getOfferPaymentToken() instead of getListingPaymentToken(). This caused the wrong token address to be cached for listings. This bug could lead to issues when listing payment tokens differ from offer payment tokens on certain chains. --- package.json | 2 +- src/sdk.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 48b7f125d..c4adb94e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensea-js", - "version": "8.0.7", + "version": "8.0.8", "description": "TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data", "license": "MIT", "author": "OpenSea Developers", diff --git a/src/sdk.ts b/src/sdk.ts index f01c48b36..6734e1219 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -28,6 +28,7 @@ import { import { getDefaultConduit, getOfferPaymentToken, + getListingPaymentToken, getSeaportAddress, } from "./utils/utils"; @@ -101,7 +102,9 @@ export class OpenSeaSDK { // Cache decimals for offer and listing payment tokens to skip network request const offerPaymentToken = getOfferPaymentToken(this.chain).toLowerCase(); - const listingPaymentToken = getOfferPaymentToken(this.chain).toLowerCase(); + const listingPaymentToken = getListingPaymentToken( + this.chain, + ).toLowerCase(); this._cachedPaymentTokenDecimals[offerPaymentToken] = 18; this._cachedPaymentTokenDecimals[listingPaymentToken] = 18;