asset-s/QuoteRequestor: use TakerRequest type
This commit is contained in:
parent
b9984b6df4
commit
e05cd1d66b
@ -288,6 +288,7 @@ export class QuoteRequestor {
|
|||||||
Object.keys(this._rfqtAssetOfferings).map(async url => {
|
Object.keys(this._rfqtAssetOfferings).map(async url => {
|
||||||
if (this._makerSupportsPair(url, makerAssetData, takerAssetData)) {
|
if (this._makerSupportsPair(url, makerAssetData, takerAssetData)) {
|
||||||
const requestParams = {
|
const requestParams = {
|
||||||
|
apiKey: options.apiKey,
|
||||||
takerAddress: options.takerAddress,
|
takerAddress: options.takerAddress,
|
||||||
...inferQueryParams(marketOperation, makerAssetData, takerAssetData, assetFillAmount),
|
...inferQueryParams(marketOperation, makerAssetData, takerAssetData, assetFillAmount),
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { tokenUtils } from '@0x/dev-utils';
|
import { tokenUtils } from '@0x/dev-utils';
|
||||||
import { assetDataUtils } from '@0x/order-utils';
|
import { assetDataUtils } from '@0x/order-utils';
|
||||||
|
import { TakerRequest } from '@0x/quote-server';
|
||||||
import { StatusCodes } from '@0x/types';
|
import { StatusCodes } from '@0x/types';
|
||||||
import { BigNumber } from '@0x/utils';
|
import { BigNumber } from '@0x/utils';
|
||||||
import * as chai from 'chai';
|
import * as chai from 'chai';
|
||||||
@ -35,10 +36,11 @@ describe('QuoteRequestor', async () => {
|
|||||||
// Set up RFQT responses
|
// Set up RFQT responses
|
||||||
// tslint:disable-next-line:array-type
|
// tslint:disable-next-line:array-type
|
||||||
const mockedRequests: MockedRfqtFirmQuoteResponse[] = [];
|
const mockedRequests: MockedRfqtFirmQuoteResponse[] = [];
|
||||||
const expectedParams = {
|
const expectedParams: TakerRequest = {
|
||||||
|
apiKey,
|
||||||
sellToken: takerToken,
|
sellToken: takerToken,
|
||||||
buyToken: makerToken,
|
buyToken: makerToken,
|
||||||
sellAmount: '10000',
|
sellAmount: new BigNumber('10000'),
|
||||||
buyAmount: undefined,
|
buyAmount: undefined,
|
||||||
takerAddress,
|
takerAddress,
|
||||||
};
|
};
|
||||||
@ -199,10 +201,11 @@ describe('QuoteRequestor', async () => {
|
|||||||
// Set up RFQT responses
|
// Set up RFQT responses
|
||||||
// tslint:disable-next-line:array-type
|
// tslint:disable-next-line:array-type
|
||||||
const mockedRequests: MockedRfqtIndicativeQuoteResponse[] = [];
|
const mockedRequests: MockedRfqtIndicativeQuoteResponse[] = [];
|
||||||
const expectedParams = {
|
const expectedParams: TakerRequest = {
|
||||||
|
apiKey,
|
||||||
sellToken: takerToken,
|
sellToken: takerToken,
|
||||||
buyToken: makerToken,
|
buyToken: makerToken,
|
||||||
sellAmount: '10000',
|
sellAmount: new BigNumber('10000'),
|
||||||
buyAmount: undefined,
|
buyAmount: undefined,
|
||||||
takerAddress,
|
takerAddress,
|
||||||
};
|
};
|
||||||
@ -293,10 +296,11 @@ describe('QuoteRequestor', async () => {
|
|||||||
// Set up RFQT responses
|
// Set up RFQT responses
|
||||||
// tslint:disable-next-line:array-type
|
// tslint:disable-next-line:array-type
|
||||||
const mockedRequests: MockedRfqtIndicativeQuoteResponse[] = [];
|
const mockedRequests: MockedRfqtIndicativeQuoteResponse[] = [];
|
||||||
const expectedParams = {
|
const expectedParams: TakerRequest = {
|
||||||
|
apiKey,
|
||||||
sellToken: takerToken,
|
sellToken: takerToken,
|
||||||
buyToken: makerToken,
|
buyToken: makerToken,
|
||||||
buyAmount: '10000',
|
buyAmount: new BigNumber('10000'),
|
||||||
sellAmount: undefined,
|
sellAmount: undefined,
|
||||||
takerAddress,
|
takerAddress,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user