diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fe42aa81..5462550bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,9 @@ # [1.3.0](https://github.com/0xProject/0x-api/compare/v1.2.0...v1.3.0) (2020-05-11) - ### Features -* Remove Kyber exclusion ([#211](https://github.com/0xProject/0x-api/issues/211)) ([aa600ab](https://github.com/0xProject/0x-api/commit/aa600abd74bb963303720d8a3cdf3b5f5044ae4f)) -* RFQ-T follow-ups ([#201](https://github.com/0xProject/0x-api/issues/201)) ([a55f22e](https://github.com/0xProject/0x-api/commit/a55f22ee866f0ce8a8e5164829bc511838019a47)), closes [/github.com/0xProject/0x-api/pull/201#discussion_r417775612](https://github.com//github.com/0xProject/0x-api/pull/201/issues/discussion_r417775612) +- Remove Kyber exclusion ([#211](https://github.com/0xProject/0x-api/issues/211)) ([aa600ab](https://github.com/0xProject/0x-api/commit/aa600abd74bb963303720d8a3cdf3b5f5044ae4f)) +- RFQ-T follow-ups ([#201](https://github.com/0xProject/0x-api/issues/201)) ([a55f22e](https://github.com/0xProject/0x-api/commit/a55f22ee866f0ce8a8e5164829bc511838019a47)), closes [/github.com/0xProject/0x-api/pull/201#discussion_r417775612](https://github.com//github.com/0xProject/0x-api/pull/201/issues/discussion_r417775612) # [1.2.0](https://github.com/0xProject/0x-api/compare/v1.1.0...v1.2.0) (2020-05-04) diff --git a/package.json b/package.json index 2ac97fb3e..d9b4da0ad 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ }, "dependencies": { "@0x/assert": "^3.0.4", - "@0x/asset-swapper": "0xProject/gitpkg-registry#0x-asset-swapper-v4.4.0-ff1811ef9", + "@0x/asset-swapper": "0xProject/gitpkg-registry#0x-asset-swapper-v4.4.0-d9e13d6b9", "@0x/connect": "^6.0.4", "@0x/contract-addresses": "0xProject/gitpkg-registry#0x-contract-addresses-v4.9.0-fb0311e67", "@0x/contract-wrappers": "0xProject/gitpkg-registry#0x-contract-wrappers-v13.6.3-fb0311e67", diff --git a/src/handlers/swap_handlers.ts b/src/handlers/swap_handlers.ts index 62e0774f3..5d7788bd5 100644 --- a/src/handlers/swap_handlers.ts +++ b/src/handlers/swap_handlers.ts @@ -37,9 +37,22 @@ export class SwapHandlers { this._swapService = swapService; } public async getSwapQuoteAsync(req: express.Request, res: express.Response): Promise { - res.status(HttpStatus.OK).send( - await this._calculateSwapQuoteAsync(parseGetSwapQuoteRequestParams(req, 'quote')), - ); + const params = parseGetSwapQuoteRequestParams(req, 'quote'); + const quote = await this._calculateSwapQuoteAsync(params); + if (params.rfqt !== undefined) { + logger.info({ + firmQuoteServed: { + taker: params.takerAddress, + apiKey: params.apiKey, + buyToken: params.buyToken, + sellToken: params.sellToken, + buyAmount: params.buyAmount, + sellAmount: params.sellAmount, + makers: quote.orders.map(order => order.makerAddress), + }, + }); + } + res.status(HttpStatus.OK).send(quote); } // tslint:disable-next-line:prefer-function-over-method public async getSwapTokensAsync(_req: express.Request, res: express.Response): Promise { diff --git a/yarn.lock b/yarn.lock index 0a3a3cdf4..7876139d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,9 +22,9 @@ lodash "^4.17.11" valid-url "^1.0.9" -"@0x/asset-swapper@0xProject/gitpkg-registry#0x-asset-swapper-v4.4.0-ff1811ef9": +"@0x/asset-swapper@0xProject/gitpkg-registry#0x-asset-swapper-v4.4.0-d9e13d6b9": version "4.4.0" - resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/64535d1f229d124c2d57102f6a9d28a9e94cc820" + resolved "https://codeload.github.com/0xProject/gitpkg-registry/tar.gz/8bf3e651d724a72912dee78cc1978a674b82b93c" dependencies: "@0x/assert" "^3.0.7" "@0x/contract-addresses" "^4.9.0"