diff --git a/lib/handlers/quote/quote.ts b/lib/handlers/quote/quote.ts index d489c20cde..26952bbe32 100644 --- a/lib/handlers/quote/quote.ts +++ b/lib/handlers/quote/quote.ts @@ -515,6 +515,9 @@ export class QuoteHandler extends APIGLambdaHandler< } else if (simulationStatus == SimulationStatus.SystemDown) { metric.putMetric('SimulationSystemDown', 1, MetricLoggerUnit.Count) metric.putMetric(`SimulationSystemDownChainId${chainId}`, 1, MetricLoggerUnit.Count) + } else if (simulationStatus == SimulationStatus.SlippageTooLow) { + metric.putMetric('SlippageTooLow', 1, MetricLoggerUnit.Count) + metric.putMetric(`SlippageTooLowChainId${chainId}`, 1, MetricLoggerUnit.Count) } const routeResponse: Array = [] diff --git a/lib/handlers/quote/util/simulation.ts b/lib/handlers/quote/util/simulation.ts index 41cd5e243a..9bde88b353 100644 --- a/lib/handlers/quote/util/simulation.ts +++ b/lib/handlers/quote/util/simulation.ts @@ -9,6 +9,7 @@ export enum RoutingApiSimulationStatus { NOT_SUPPORTED = 'NOT_SUPPORTED', NOT_APPROVED = 'NOT_APPROVED', SYSTEM_DOWN = 'SYSTEM_DOWN', + SLIPPAGE_TOO_LOW = 'SLIPPAGE_TOO_LOW', UNKNOWN = '', } @@ -31,6 +32,8 @@ export const simulationStatusTranslation = ( return RoutingApiSimulationStatus.NOT_APPROVED case SimulationStatus.SystemDown: return RoutingApiSimulationStatus.SYSTEM_DOWN + case SimulationStatus.SlippageTooLow: + return RoutingApiSimulationStatus.SLIPPAGE_TOO_LOW default: log.error(`Unknown simulation status ${simulationStatus}`) return RoutingApiSimulationStatus.UNKNOWN