diff --git a/src/handlers/swap_handlers.ts b/src/handlers/swap_handlers.ts index 82a26a36af..6bee4af81c 100644 --- a/src/handlers/swap_handlers.ts +++ b/src/handlers/swap_handlers.ts @@ -397,18 +397,18 @@ const parseSwapQuoteRequestParams = (req: express.Request, endpoint: 'price' | ' ).toLowerCase(); const isWrap = isNativeSell && isNativeWrappedSymbolOrAddress(buyToken, CHAIN_ID); const isUnwrap = isNativeWrappedSymbolOrAddress(sellToken, CHAIN_ID) && isNativeBuy; - // if token addresses are the same but a unwrap or wrap operation is requested, ignore error - if (!isUnwrap && !isWrap && sellToken === buyToken) { - throw new ValidationError( - ['buyToken', 'sellToken'].map((field) => { - return { - field, - code: ValidationErrorCodes.RequiredField, - reason: 'buyToken and sellToken must be different', - }; - }), - ); - } + // // if token addresses are the same but a unwrap or wrap operation is requested, ignore error + // if (!isUnwrap && !isWrap && sellToken === buyToken) { + // throw new ValidationError( + // ['buyToken', 'sellToken'].map((field) => { + // return { + // field, + // code: ValidationErrorCodes.RequiredField, + // reason: 'buyToken and sellToken must be different', + // }; + // }), + // ); + // } if (sellToken === NULL_ADDRESS || buyToken === NULL_ADDRESS) { throw new ValidationError(