Merge pull request #53 from drift-labs/patch

Patch
This commit is contained in:
Nour Alharithi
2023-12-15 13:10:27 -08:00
committed by GitHub
2 changed files with 11 additions and 10 deletions

View File

@@ -789,8 +789,8 @@ const main = async () => {
if (useRedis) { if (useRedis) {
if ( if (
!isSpot && !isSpot &&
`${includeVamm}`.toLowerCase() === 'true' && `${includeVamm}`?.toLowerCase() === 'true' &&
`${includeOracle}`.toLowerCase().toLowerCase() === 'true' && `${includeOracle}`?.toLowerCase() === 'true' &&
!grouping !grouping
) { ) {
let redisL2: string; let redisL2: string;
@@ -814,9 +814,9 @@ const main = async () => {
l2Formatted = redisL2; l2Formatted = redisL2;
} else if ( } else if (
isSpot && isSpot &&
`${includeSerum}`.toLowerCase() === 'true' && `${includeSerum}`?.toLowerCase() === 'true' &&
`${includePhoenix}`.toLowerCase() === 'true' && `${includePhoenix}`?.toLowerCase() === 'true' &&
`${includeOracle}`.toLowerCase() === 'true' && `${includeOracle}`?.toLowerCase() === 'true' &&
!grouping !grouping
) { ) {
let redisL2: string; let redisL2: string;
@@ -971,8 +971,8 @@ const main = async () => {
if (useRedis) { if (useRedis) {
if ( if (
!isSpot && !isSpot &&
normedParam['includeVamm'].toLowerCase() === 'true' && normedParam['includeVamm']?.toLowerCase() === 'true' &&
normedParam['includeOracle'].toLowerCase() === 'true' && normedParam['includeOracle']?.toLowerCase() === 'true' &&
!normedParam['grouping'] !normedParam['grouping']
) { ) {
let redisL2: string; let redisL2: string;
@@ -996,8 +996,8 @@ const main = async () => {
} }
} else if ( } else if (
isSpot && isSpot &&
normedParam['includePhoenix'].toLowerCase() === 'true' && normedParam['includePhoenix']?.toLowerCase() === 'true' &&
normedParam['includeSerum'].toLowerCase() === 'true' && normedParam['includeSerum']?.toLowerCase() === 'true' &&
!normedParam['grouping'] !normedParam['grouping']
) { ) {
let redisL2: string; let redisL2: string;

View File

@@ -60,7 +60,8 @@ const useOrderSubscriber =
const useGrpc = process.env.USE_GRPC?.toLowerCase() === 'true'; const useGrpc = process.env.USE_GRPC?.toLowerCase() === 'true';
const useWebsocket = process.env.USE_WEBSOCKET?.toLowerCase() === 'true'; const useWebsocket = process.env.USE_WEBSOCKET?.toLowerCase() === 'true';
const ORDERBOOK_UPDATE_INTERVAL = 1000; const ORDERBOOK_UPDATE_INTERVAL =
parseInt(process.env.ORDERBOOK_UPDATE_INTERVAL) || 1000;
const WS_FALLBACK_FETCH_INTERVAL = 10_000; const WS_FALLBACK_FETCH_INTERVAL = 10_000;
logger.info(`RPC endpoint: ${endpoint}`); logger.info(`RPC endpoint: ${endpoint}`);