Skip to content

Commit

Permalink
Merge 1ddb6d4 into 411fade
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Mar 26, 2024
2 parents 411fade + 1ddb6d4 commit 166a328
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 9 additions & 2 deletions src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { setTimeout } from "timers/promises";
import { ethers } from "ethers";
import {
getCollectionPath,
Expand Down Expand Up @@ -68,6 +67,14 @@ import {
accountFromJSON,
} from "../utils/utils";

function stall(duration: number): Promise<void> {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, duration);
});
}

/**
* The API class for the OpenSea SDK.
* @category Main Classes
Expand Down Expand Up @@ -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;
};

Expand Down
2 changes: 1 addition & 1 deletion test/integration/postOrder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ suite("SDK: order posting", () => {
const postOrderRequest = {
collectionSlug: collection.collection,
accountAddress: walletAddress,
amount: OFFER_AMOUNT,
amount: 0.0001,
quantity: 1,
paymentTokenAddress,
};
Expand Down

0 comments on commit 166a328

Please sign in to comment.