Merge branch 'master' into mainnet-beta
This commit is contained in:
Submodule drift-common updated: 05cc04b114...6ae9e6541b
@@ -46,6 +46,14 @@ function evaluateHealth(currentSlot: number): {
|
||||
return { isHealthy: true };
|
||||
}
|
||||
|
||||
const currentHealthStatus = getHealthStatus();
|
||||
if (currentHealthStatus !== HEALTH_STATUS.Ok) {
|
||||
return {
|
||||
isHealthy: false,
|
||||
reason: `Unhealthy state: ${currentHealthStatus}`,
|
||||
};
|
||||
}
|
||||
|
||||
const timeDelta = now - globalHealthState.lastSlotTimestamp;
|
||||
const slotDelta = currentSlot - globalHealthState.lastSlot;
|
||||
|
||||
|
||||
@@ -937,6 +937,7 @@ const main = async (): Promise<void> => {
|
||||
auctionEndPriceOffsetFrom,
|
||||
additionalEndPriceBuffer,
|
||||
userOrderId,
|
||||
forceUpToSlippage,
|
||||
} = req.query;
|
||||
|
||||
// Validate required parameters
|
||||
@@ -1001,6 +1002,7 @@ const main = async (): Promise<void> => {
|
||||
auctionEndPriceOffsetFrom: auctionEndPriceOffsetFrom as any,
|
||||
additionalEndPriceBuffer: additionalEndPriceBuffer as string,
|
||||
userOrderId: parseNumber(userOrderId as string),
|
||||
forceUpToSlippage: parseBoolean(forceUpToSlippage as string),
|
||||
};
|
||||
|
||||
// Only add non-undefined values
|
||||
|
||||
@@ -128,6 +128,9 @@ const SPOT_MARKETS_TO_LOAD =
|
||||
: undefined;
|
||||
|
||||
const enableOffloadQueue = process.env.ENABLE_OFFLOAD === 'true';
|
||||
const ignoreList = process.env.IGNORE_LIST?.split(',') || [
|
||||
'5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW',
|
||||
];
|
||||
|
||||
logger.info(`RPC endpoint: ${endpoint}`);
|
||||
logger.info(`WS endpoint: ${wsEndpoint}`);
|
||||
@@ -478,7 +481,7 @@ const main = async () => {
|
||||
const orderSubscriber = new OrderSubscriberFiltered({
|
||||
driftClient,
|
||||
subscriptionConfig,
|
||||
ignoreList: ['5N1AcdftujhXWZdBaqfciaKtXn6uVBKjmgwf6aQxR1vW']
|
||||
ignoreList,
|
||||
});
|
||||
|
||||
dlobProvider = getDLOBProviderFromOrderSubscriber(orderSubscriber);
|
||||
|
||||
@@ -21,4 +21,5 @@ export type AuctionParamArgs = {
|
||||
auctionEndPriceOffsetFrom?: TradeOffsetPrice;
|
||||
additionalEndPriceBuffer?: string;
|
||||
userOrderId?: number;
|
||||
forceUpToSlippage?: boolean;
|
||||
};
|
||||
|
||||
@@ -985,7 +985,7 @@ export const mapToMarketOrderParams = async (
|
||||
slippageTolerance: processedSlippageTolerance,
|
||||
isOracleOrder: params.isOracleOrder,
|
||||
additionalEndPriceBuffer,
|
||||
forceUpToSlippage: true,
|
||||
forceUpToSlippage: params.forceUpToSlippage,
|
||||
userOrderId: params.userOrderId,
|
||||
},
|
||||
estimatedPrices,
|
||||
|
||||
Reference in New Issue
Block a user