Skip to content

Commit

Permalink
fix: update headers for fetchAllOrders
Browse files Browse the repository at this point in the history
  • Loading branch information
tv3636 committed Dec 20, 2023
1 parent ab0cbbf commit b911504
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/jobs/seaport-sync/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,19 @@ export const fetchAllOrders = async (
listedBefore: toTimestamp,
});

const headers: any = {
url,
"x-api-key": config.backfillOpenseaApiKey || "",
};

if (config.openseaApiUrl && config.openseaNftApiKey) {
headers["x-nft-api-key"] = config.openseaNftApiKey;
}

const options: AxiosRequestConfig = {
method: "GET",
url: config.openseaApiUrl || url,
headers: {
url,
"x-api-key": config.backfillOpenseaApiKey || "",
},
headers,
};

try {
Expand Down

0 comments on commit b911504

Please sign in to comment.