Skip to content

Commit

Permalink
Merge pull request #119 from reservoirprotocol/tv/platf-2784-update-o…
Browse files Browse the repository at this point in the history
…pensea-proxy-address

feat: update os request
  • Loading branch information
tv3636 authored Dec 20, 2023
2 parents f0c4b85 + 8383b31 commit ab0cbbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const config = {
okxApiKey: String(process.env.OKX_API_KEY),
okxSecretKey: String(process.env.OKX_SECRET_KEY),
okxPassphrase: String(process.env.OKX_PASSPHRASE),
openseaNftApiKey: String(process.env.OPENSEA_NFT_API_KEY),

blurUrl: String(process.env.BLUR_URL),
openseaApiUrl: String(process.env.OPENSEA_API_URL),
Expand Down
18 changes: 12 additions & 6 deletions src/jobs/seaport-sync/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,21 @@ export const fetchOrders = async (
cursor,
});

const headers: any = {
url,
"X-API-KEY": !_.includes([5, 80001, 84531, 999, 11155111], config.chainId)
? details?.apiKey || config.realtimeOpenseaApiKey
: "",
};

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": !_.includes([5, 80001, 84531, 999, 11155111], config.chainId)
? details?.apiKey || config.realtimeOpenseaApiKey
: "",
},
headers,
};

try {
Expand Down

0 comments on commit ab0cbbf

Please sign in to comment.