diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-02 06:11:03 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-02 06:11:03 +0800 |
commit | c50c4a4669d881000bb74de9a33684319ff740b9 (patch) | |
tree | 93c4d487cc735ee389f9a0b28e3fbc7c51d52070 /packages | |
parent | 32de4862ba94223258f7a08da6373313c9e28f8b (diff) | |
download | dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar.gz dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar.bz2 dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar.lz dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar.xz dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.tar.zst dexon-sol-tools-c50c4a4669d881000bb74de9a33684319ff740b9.zip |
fix: make maxPerPage for the SRA getAvailableMakerAssetDatasAsync call a local var
Diffstat (limited to 'packages')
-rw-r--r-- | packages/asset-buyer/src/constants.ts | 1 | ||||
-rw-r--r-- | packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/asset-buyer/src/constants.ts b/packages/asset-buyer/src/constants.ts index b2f025bdb..cc415102c 100644 --- a/packages/asset-buyer/src/constants.ts +++ b/packages/asset-buyer/src/constants.ts @@ -36,6 +36,5 @@ export const constants = { DEFAULT_ASSET_BUYER_OPTS, DEFAULT_BUY_QUOTE_EXECUTION_OPTS, DEFAULT_BUY_QUOTE_REQUEST_OPTS, - MAX_PER_PAGE: 1000, EMPTY_ORDERS_AND_FILLABLE_AMOUNTS, }; diff --git a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts index c6adcfc4a..be1fc55d6 100644 --- a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts +++ b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts @@ -2,7 +2,6 @@ import { HttpClient } from '@0x/connect'; import { APIOrder, AssetPairsResponse, OrderbookResponse } from '@0x/types'; import * as _ from 'lodash'; -import { constants } from '../constants'; import { AssetBuyerError, OrderProvider, @@ -87,7 +86,9 @@ export class StandardRelayerAPIOrderProvider implements OrderProvider { * @return An array of asset data strings that can be purchased using takerAssetData. */ public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise<string[]> { - const requestOpts = { networkId: this.networkId, perPage: constants.MAX_PER_PAGE }; + // Return a maximum of 1000 asset datas + const maxPerPage = 1000; + const requestOpts = { networkId: this.networkId, perPage: maxPerPage }; const assetPairsRequest = { assetDataA: takerAssetData }; const fullRequest = { ...requestOpts, |