aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer/src/constants.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-09-18 22:42:52 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-09-18 22:42:52 +0800
commit0003666050c4991623cb36ec994d536e4703b4fe (patch)
treee5b38ec2c8d5194c5c593b2beef90e6a5d09df0a /packages/asset-buyer/src/constants.ts
parentb947609ff18f518ac36435083a97604b983a3081 (diff)
downloaddexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar.gz
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar.bz2
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar.lz
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar.xz
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.tar.zst
dexon-sol-tools-0003666050c4991623cb36ec994d536e4703b4fe.zip
make the slippage percentage customizable by integrator
Diffstat (limited to 'packages/asset-buyer/src/constants.ts')
-rw-r--r--packages/asset-buyer/src/constants.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/asset-buyer/src/constants.ts b/packages/asset-buyer/src/constants.ts
index e20bcc6ed..53fe89160 100644
--- a/packages/asset-buyer/src/constants.ts
+++ b/packages/asset-buyer/src/constants.ts
@@ -1,11 +1,18 @@
import { BigNumber } from '@0xproject/utils';
+import { BuyQuoteRequestOpts } from './types';
+
+const DEFAULT_BUY_QUOTE_REQUEST_OPTS: BuyQuoteRequestOpts = {
+ feePercentage: 0,
+ forceOrderRefresh: false,
+ slippagePercentage: 0.2, // 20% slippage protection
+};
+
export const constants = {
ZERO_AMOUNT: new BigNumber(0),
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
MAINNET_NETWORK_ID: 1,
- DEFAULT_SLIPPAGE_PERCENTAGE: 0.2, // 20% slippage protection
DEFAULT_ORDER_REFRESH_INTERVAL_MS: 10000, // 10 seconds
- DEFAULT_FEE_PERCENTAGE: 0,
ETHER_TOKEN_DECIMALS: 18,
+ DEFAULT_BUY_QUOTE_REQUEST_OPTS,
};