diff --git a/package.json b/package.json index 171021d8b..2b2eb4ba4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensea-js", - "version": "7.1.0", + "version": "7.1.1", "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/api/api.ts b/src/api/api.ts index 0a2946522..bda0ede5c 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,4 +1,3 @@ -import { setTimeout } from "timers/promises"; import { ethers } from "ethers"; import { getCollectionPath, @@ -68,6 +67,14 @@ import { accountFromJSON, } from "../utils/utils"; +function stall(duration: number): Promise { + return new Promise((resolve) => { + setTimeout(() => { + resolve(); + }, duration); + }); +} + /** * The API class for the OpenSea SDK. * @category Main Classes @@ -633,7 +640,7 @@ export class OpenSeaAPI { `Fetch attempt ${attempt} failed with status ${resp.statusCode}`, ); // Wait 1s between tries - await setTimeout(1000); + await stall(1000); return true; }; diff --git a/test/integration/postOrder.spec.ts b/test/integration/postOrder.spec.ts index 6fff14f40..ae8b4c9dd 100644 --- a/test/integration/postOrder.spec.ts +++ b/test/integration/postOrder.spec.ts @@ -123,7 +123,7 @@ suite("SDK: order posting", () => { const postOrderRequest = { collectionSlug: collection.collection, accountAddress: walletAddress, - amount: OFFER_AMOUNT, + amount: 0.0001, quantity: 1, paymentTokenAddress, };