diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-23 14:23:50 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-24 05:06:21 +0800 |
commit | 4db33ba2b37f4682ecae5da325e631d546a8a24e (patch) | |
tree | c0453e856ee02a5d4538ee640a34cdb46861dc94 /packages/asset-buyer/src/constants.ts | |
parent | 37f87ab267c5eb10c70d7eb4d3eef01bf8ed7ac1 (diff) | |
download | dexon-0x-contracts-4db33ba2b37f4682ecae5da325e631d546a8a24e.tar.gz dexon-0x-contracts-4db33ba2b37f4682ecae5da325e631d546a8a24e.tar.zst dexon-0x-contracts-4db33ba2b37f4682ecae5da325e631d546a8a24e.zip |
feat(asset-buyer): update buyQuoteCalculator to match rounding behavior in contracts
Diffstat (limited to 'packages/asset-buyer/src/constants.ts')
-rw-r--r-- | packages/asset-buyer/src/constants.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/asset-buyer/src/constants.ts b/packages/asset-buyer/src/constants.ts index 55effdb23..c912253bd 100644 --- a/packages/asset-buyer/src/constants.ts +++ b/packages/asset-buyer/src/constants.ts @@ -1,6 +1,7 @@ +import { SignedOrder } from '@0x/types'; import { BigNumber } from '@0x/utils'; -import { AssetBuyerOpts, BuyQuoteExecutionOpts, BuyQuoteRequestOpts } from './types'; +import { AssetBuyerOpts, BuyQuoteExecutionOpts, BuyQuoteRequestOpts, OrdersAndFillableAmounts } from './types'; const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; const MAINNET_NETWORK_ID = 1; @@ -22,6 +23,11 @@ const DEFAULT_BUY_QUOTE_EXECUTION_OPTS: BuyQuoteExecutionOpts = { feeRecipient: NULL_ADDRESS, }; +const EMPTY_ORDERS_AND_FILLABLE_AMOUNTS: OrdersAndFillableAmounts = { + orders: [] as SignedOrder[], + remainingFillableMakerAssetAmounts: [] as BigNumber[], +}; + export const constants = { ZERO_AMOUNT: new BigNumber(0), NULL_ADDRESS, @@ -31,4 +37,5 @@ export const constants = { DEFAULT_BUY_QUOTE_EXECUTION_OPTS, DEFAULT_BUY_QUOTE_REQUEST_OPTS, MAX_PER_PAGE: 10000, + EMPTY_ORDERS_AND_FILLABLE_AMOUNTS, }; |