diff --git a/lib/config/chains.ts b/lib/config/chains.ts index 1c0c7240..e3c5c0c8 100644 --- a/lib/config/chains.ts +++ b/lib/config/chains.ts @@ -1,3 +1,9 @@ import { ChainId } from '../util/chains'; -export const SUPPORTED_CHAINS: ChainId[] = [ChainId.MAINNET, ChainId.GÖRLI, ChainId.POLYGON, ChainId.SEPOLIA, ChainId.ARBITRUM_ONE]; +export const SUPPORTED_CHAINS: ChainId[] = [ + ChainId.MAINNET, + ChainId.GÖRLI, + ChainId.POLYGON, + ChainId.SEPOLIA, + ChainId.ARBITRUM_ONE, +]; diff --git a/lib/entities/HardQuoteResponse.ts b/lib/entities/HardQuoteResponse.ts index 6262653c..656976ac 100644 --- a/lib/entities/HardQuoteResponse.ts +++ b/lib/entities/HardQuoteResponse.ts @@ -2,9 +2,9 @@ import { CosignedV2DutchOrder } from '@uniswap/uniswapx-sdk'; import { BigNumber } from 'ethers'; import { v4 as uuidv4 } from 'uuid'; +import { HardQuoteRequest } from '.'; import { HardQuoteResponseData } from '../handlers/hard-quote/schema'; import { currentTimestampInMs, timestampInMstoSeconds } from '../util/time'; -import { HardQuoteRequest } from '.'; // data class for hard quote response helpers and conversions export class HardQuoteResponse { diff --git a/lib/handlers/hard-quote/handler.ts b/lib/handlers/hard-quote/handler.ts index 3f48e322..d91b3a78 100644 --- a/lib/handlers/hard-quote/handler.ts +++ b/lib/handlers/hard-quote/handler.ts @@ -106,6 +106,17 @@ export class QuoteHandler extends APIGLambdaHandler< metric.putMetric(Metric.QUOTE_200, 1, MetricLoggerUnit.Count); metric.putMetric(Metric.QUOTE_LATENCY, Date.now() - start, MetricLoggerUnit.Milliseconds); const hardResponse = new HardQuoteResponse(request, cosignedOrder); + if (!bestQuote) { + // The RFQ responses are logged in getBestQuote() + // we log the Open Orders here + log.info({ + eventType: 'QuoteResponse', + body: { + ...hardResponse.toLog(), + offerer: request.swapper, + }, + }); + } return { statusCode: 200, body: hardResponse.toResponseJSON(), diff --git a/lib/handlers/hard-quote/index.ts b/lib/handlers/hard-quote/index.ts index 73612078..a60e1b13 100644 --- a/lib/handlers/hard-quote/index.ts +++ b/lib/handlers/hard-quote/index.ts @@ -1,3 +1,3 @@ export { QuoteHandler as HardQuoteHandler } from './handler'; -export { RequestInjected, ContainerInjected, QuoteInjector as HardQuoteInjector } from './injector'; +export { ContainerInjected, QuoteInjector as HardQuoteInjector, RequestInjected } from './injector'; export * from './schema'; diff --git a/lib/providers/analytics/firehose.ts b/lib/providers/analytics/firehose.ts index bedea91c..1dea9062 100644 --- a/lib/providers/analytics/firehose.ts +++ b/lib/providers/analytics/firehose.ts @@ -1,8 +1,8 @@ import { FirehoseClient, PutRecordCommand } from '@aws-sdk/client-firehose'; import { default as Logger } from 'bunyan'; -import { AnalyticsEvent } from '../../entities/analytics-events'; import { IAnalyticsLogger } from '.'; +import { AnalyticsEvent } from '../../entities/analytics-events'; export class FirehoseLogger implements IAnalyticsLogger { private log: Logger; diff --git a/lib/util/chains.ts b/lib/util/chains.ts index 0f70fcc2..b8d69afa 100644 --- a/lib/util/chains.ts +++ b/lib/util/chains.ts @@ -25,8 +25,8 @@ export const ID_TO_NETWORK_NAME = (id: number): ChainName => { return ChainName.POLYGON; case 11155111: return ChainName.SEPOLIA; - case 42161: - return ChainName.ARBITRUM_ONE; + case 42161: + return ChainName.ARBITRUM_ONE; default: throw new Error(`Unknown chain id: ${id}`); }