Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeroman committed Feb 8, 2024
2 parents 8db2d90 + af17186 commit 117ae87
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/continuous-delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ jobs:
working-directory: k8s-configs
run: |
./utils/version_update.sh \
./prod/platform/relayer.yaml \
./prod/platform/relayer-mainnet.yaml \
${{ github.sha }} \
relayer
relayer-mainnet
./utils/version_update.sh \
./prod/platform/relayer-arbitrum.yaml \
${{ github.sha }} \
Expand All @@ -102,9 +102,9 @@ jobs:
${{ github.sha }} \
relayer-polygon
./utils/version_update.sh \
./prod/platform/relayer-realtime.yaml \
./prod/platform/relayer-realtime-mainnet.yaml \
${{ github.sha }} \
relayer-realtime
relayer-realtime-mainnet
./utils/version_update.sh \
./prod/platform/relayer-optimism.yaml \
${{ github.sha }} \
Expand Down Expand Up @@ -133,14 +133,6 @@ jobs:
./prod/platform/relayer-sepolia.yaml \
${{ github.sha }} \
relayer-sepolia
./utils/version_update.sh \
./prod/platform/relayer-base-goerli.yaml \
${{ github.sha }} \
relayer-base-goerli
./utils/version_update.sh \
./prod/platform/relayer-zora-testnet.yaml \
${{ github.sha }} \
relayer-zora-testnet
./utils/version_update.sh \
./prod/platform/relayer-bsc.yaml \
${{ github.sha }} \
Expand Down
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
34 changes: 23 additions & 11 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 Expand Up @@ -147,7 +153,7 @@ export const fetchOrders = async (
} else {
logger.error(
"fetch_orders_seaport",
`Seaport - Error. side=${side}, cursor=${cursor}, url=${url}, apiKey=${details?.apiKey}, realtimeOpenseaApiKey=${config.realtimeOpenseaApiKey}, error=${error}`
`Seaport - Error. side=${side}, cursor=${cursor}, url=${url}, apiKey=${details?.apiKey}, realtimeOpenseaApiKey=${config.realtimeOpenseaApiKey}, error=${error}, stack=${error.stack}`
);
}

Expand Down Expand Up @@ -187,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 117ae87

Please sign in to comment.